@gusto/embedded-react-sdk 0.13.3 → 0.13.4

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 (256) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/assets/icons/hamburger.svg.js +5 -5
  3. package/dist/assets/icons/hamburger.svg.js.map +1 -1
  4. package/dist/assets/icons/receipt-check.svg.js +10 -0
  5. package/dist/assets/icons/receipt-check.svg.js.map +1 -0
  6. package/dist/components/Common/DataView/DataTable/DataTable.js +29 -28
  7. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  8. package/dist/components/Common/DocumentViewer/DocumentViewer.d.ts +1 -1
  9. package/dist/components/Common/DocumentViewer/DocumentViewer.js +9 -9
  10. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  11. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
  12. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  13. package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
  14. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  15. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  16. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +33 -31
  17. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  18. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +4 -0
  19. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  20. package/dist/components/Common/UI/Table/Table.js +22 -13
  21. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  22. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  23. package/dist/components/Common/UI/Table/TableTypes.d.ts +5 -0
  24. package/dist/components/Common/UI/Table/TableTypes.js +2 -1
  25. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  26. package/dist/components/Common/UI/Text/Text.module.scss.js +15 -14
  27. package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
  28. package/dist/components/Common/UI/Text/TextTypes.d.ts +2 -2
  29. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
  31. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
  33. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  35. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  36. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +2 -3
  37. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  38. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
  39. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  40. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  41. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  42. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
  43. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -11
  45. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  46. package/dist/components/Company/BankAccount/BankAccount.js +25 -21
  47. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  48. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  49. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
  50. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
  52. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  53. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
  54. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  55. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
  56. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  57. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  58. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  59. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +34 -35
  60. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  61. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -7
  62. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  63. package/dist/components/Company/FederalTaxes/Actions.js +6 -5
  64. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  65. package/dist/components/Company/FederalTaxes/FederalTaxes.js +12 -13
  66. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  67. package/dist/components/Company/FederalTaxes/Form.js +4 -3
  68. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  69. package/dist/components/Company/Industry/Actions.js +3 -2
  70. package/dist/components/Company/Industry/Actions.js.map +1 -1
  71. package/dist/components/Company/Industry/Edit.js +5 -4
  72. package/dist/components/Company/Industry/Edit.js.map +1 -1
  73. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  74. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  75. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  76. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  77. package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -11
  78. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  79. package/dist/components/Company/Locations/Locations.js +21 -17
  80. package/dist/components/Company/Locations/Locations.js.map +1 -1
  81. package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
  82. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  83. package/dist/components/Company/Locations/LocationsList/List.js +16 -16
  84. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  85. package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -7
  86. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  87. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +21 -17
  88. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  89. package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
  90. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  91. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
  92. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  93. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
  94. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  95. package/dist/components/Company/PaySchedule/PaySchedule.js +33 -34
  96. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  97. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -9
  98. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  99. package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
  100. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  101. package/dist/components/Company/PaySchedule/_parts/Head.js +7 -6
  102. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  103. package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
  104. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  105. package/dist/components/Company/StateTaxes/StateTaxes.js +20 -16
  106. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  107. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  108. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  109. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  110. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  111. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
  112. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  113. package/dist/components/Contractor/Address/Address.js +4 -5
  114. package/dist/components/Contractor/Address/Address.js.map +1 -1
  115. package/dist/components/Contractor/Address/Form.js +3 -4
  116. package/dist/components/Contractor/Address/Form.js.map +1 -1
  117. package/dist/components/Contractor/ContractorList/index.js +17 -17
  118. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +25 -21
  119. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  120. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -5
  121. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  122. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  123. package/dist/components/Contractor/Submit/Submit.js +1 -1
  124. package/dist/components/Employee/Compensation/Actions.js +1 -1
  125. package/dist/components/Employee/Compensation/Edit.js +12 -12
  126. package/dist/components/Employee/Compensation/List.js +23 -22
  127. package/dist/components/Employee/Compensation/List.js.map +1 -1
  128. package/dist/components/Employee/Deductions/DeductionsComponents.js +1 -1
  129. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
  130. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +55 -0
  131. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +221 -0
  132. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
  133. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
  134. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
  135. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +42 -0
  136. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +132 -0
  137. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
  138. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
  139. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
  140. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
  141. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +7 -0
  142. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +98 -0
  143. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +1 -0
  144. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  145. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +8 -8
  146. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
  147. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  148. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -8
  149. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  150. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  151. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  152. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +19 -15
  153. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  154. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +9 -10
  155. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  156. package/dist/components/Employee/EmployeeList/Actions.js +3 -2
  157. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  158. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  159. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  160. package/dist/components/Employee/EmployeeList/Head.js +6 -5
  161. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  162. package/dist/components/Employee/EmployeeList/List.js +12 -12
  163. package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
  164. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  165. package/dist/components/Employee/FederalTaxes/FederalForm.js +12 -11
  166. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  167. package/dist/components/Employee/Landing/Landing.js +8 -8
  168. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +24 -20
  169. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  170. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  171. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  172. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  173. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
  174. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -8
  175. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  176. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  177. package/dist/components/Employee/Profile/Actions.js +7 -6
  178. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  179. package/dist/components/Employee/Profile/HomeAddress.js +5 -6
  180. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  181. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
  182. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  183. package/dist/components/Employee/Profile/Profile.d.ts +1 -0
  184. package/dist/components/Employee/Profile/Profile.js +22 -22
  185. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  186. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +17 -13
  187. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
  188. package/dist/components/Employee/StateTaxes/Actions.js +8 -7
  189. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  190. package/dist/components/Employee/Taxes/Actions.js +9 -8
  191. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  192. package/dist/components/Employee/Taxes/FederalForm.js +13 -12
  193. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  194. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.d.ts +7 -0
  195. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerList.d.ts +6 -0
  196. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerTypes.d.ts +101 -0
  197. package/dist/components/Payroll/PayrollBlocker/index.d.ts +4 -0
  198. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +64 -56
  199. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  200. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +2 -3
  201. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  202. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +65 -66
  203. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  204. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
  205. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  206. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +2 -0
  207. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +26 -0
  208. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -0
  209. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +25 -0
  210. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +59 -0
  211. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -0
  212. package/dist/components/Payroll/PayrollFlow/index.d.ts +3 -0
  213. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +7 -0
  214. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +116 -0
  215. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -0
  216. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
  217. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  218. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +7 -6
  219. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  220. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +3 -1
  221. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +60 -52
  222. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  223. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -1
  224. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +97 -96
  225. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  226. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +7 -0
  227. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +21 -0
  228. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -0
  229. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +220 -0
  230. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -0
  231. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +28 -0
  232. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -0
  233. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +46 -37
  234. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
  235. package/dist/components/Payroll/index.d.ts +2 -0
  236. package/dist/components/Payroll/index.js +12 -8
  237. package/dist/components/Payroll/index.js.map +1 -1
  238. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  239. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  240. package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
  241. package/dist/contexts/ThemeProvider/theme.js +2 -1
  242. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  243. package/dist/i18n/I18n.js +1 -1
  244. package/dist/i18n/I18n.js.map +1 -1
  245. package/dist/i18n/en/Employee.Deductions.json.js +126 -66
  246. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  247. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +15 -15
  248. package/dist/i18n/en/Payroll.PayrollOverview.json.js +8 -8
  249. package/dist/i18n/en/PayrollBlocker.json.js +18 -0
  250. package/dist/i18n/en/PayrollBlocker.json.js.map +1 -0
  251. package/dist/shared/constants.d.ts +12 -4
  252. package/dist/shared/constants.js +37 -33
  253. package/dist/shared/constants.js.map +1 -1
  254. package/dist/style.css +1 -1
  255. package/dist/types/i18next.d.ts +40 -2
  256. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"span\">{getStreet(location)}</Components.Text>\n <br />\n <Components.Text as=\"span\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,I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mBc,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAJ;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAH;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAa,EAACQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAK,EAAClB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASW,GAC7C,UAAAE,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAA,EAAS,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"div\">{getStreet(location)}</Components.Text>\n <Components.Text as=\"div\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb;AAAA,IACJ,cAAAC;AAAA,IACA,oB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AA,MAACM;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAOX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAV,EAAmBc,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAJ;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAH;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAa,EAACQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAK,EAAClB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASW,GAC7C,UAAAE,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAA,EAAS,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as p, Fragment as u } from "react/jsx-runtime";
2
2
  import { useLocationsGetSuspense as L } from "@gusto/embedded-api/react-query/locationsGet";
3
- import { useState as c } from "react";
3
+ import { useState as m } from "react";
4
4
  import { Head as f } from "./Head.js";
5
5
  import { List as C } from "./List.js";
6
6
  import { Actions as A } from "./Actions.js";
@@ -9,23 +9,22 @@ import { useI18n as O } from "../../../../i18n/I18n.js";
9
9
  import { BaseComponent as x } from "../../../Base/Base.js";
10
10
  import { useBase as E } from "../../../Base/useBase.js";
11
11
  import { Flex as I } from "../../../Common/Flex/Flex.js";
12
- import "react-i18next";
13
12
  import "classnames";
14
13
  import { companyEvents as i } from "../../../../shared/constants.js";
15
- function V(o) {
14
+ function U(o) {
16
15
  return /* @__PURE__ */ e(x, { ...o, children: /* @__PURE__ */ e(v, { ...o, children: o.children }) });
17
16
  }
18
17
  function v({ companyId: o, className: d, children: s }) {
19
18
  O("Company.Locations");
20
- const { onEvent: a } = E(), [m, n] = c(1), [l, h] = c(5), {
19
+ const { onEvent: a } = E(), [c, n] = m(1), [l, h] = m(5), {
21
20
  data: { locationList: P, httpMeta: g }
22
- } = L({ companyId: o, page: m, per: l }), r = Number(g.response.headers.get("x-total-pages") ?? 1);
21
+ } = L({ companyId: o, page: c, per: l }), r = Number(g.response.headers.get("x-total-pages") ?? 1);
23
22
  return /* @__PURE__ */ e("section", { className: d, children: /* @__PURE__ */ e(
24
23
  N,
25
24
  {
26
25
  value: {
27
26
  locationList: P ?? [],
28
- currentPage: m,
27
+ currentPage: c,
29
28
  totalPages: r,
30
29
  handleFirstPage: () => {
31
30
  n(1);
@@ -61,6 +60,6 @@ function v({ companyId: o, className: d, children: s }) {
61
60
  ) });
62
61
  }
63
62
  export {
64
- V as LocationsList
63
+ U as LocationsList
65
64
  };
66
65
  //# sourceMappingURL=LocationsList.js.map
@@ -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'\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(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: number) => {\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 }}\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":";;;;;;;;;;;;;;AAgBO,SAASA,EAAcC,GAA2B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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,MAsBQ;AAAA,MAGF,UAAA,gBAAArB,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'\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(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: number) => {\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 }}\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":";;;;;;;;;;;;;AAgBO,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,S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AAK,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,26 +1,30 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { createMachine as m } from "robot3";
3
+ import { useMemo as p } from "react";
3
4
  import { onboardingMachine as a } from "./onboardingStateMachine.js";
4
- import { OnboardingOverviewContextual as p } from "./OnboardingFlowComponents.js";
5
+ import { OnboardingOverviewContextual as s } from "./OnboardingFlowComponents.js";
5
6
  import { Flow as c } from "../../Flow/Flow.js";
6
- const b = ({ companyId: o, onEvent: r, defaultValues: e }) => {
7
- const n = m(
8
- "overview",
9
- a,
10
- (t) => ({
11
- ...t,
12
- component: p,
13
- companyId: o,
14
- defaultValues: e,
15
- totalSteps: 8,
16
- currentStep: 1,
17
- showProgress: !1
18
- //Overview step does not show progress bar
19
- })
7
+ const v = ({ companyId: o, onEvent: e, defaultValues: r }) => {
8
+ const t = p(
9
+ () => m(
10
+ "overview",
11
+ a,
12
+ (n) => ({
13
+ ...n,
14
+ component: s,
15
+ companyId: o,
16
+ defaultValues: r,
17
+ totalSteps: 8,
18
+ currentStep: 1,
19
+ showProgress: !1
20
+ //Overview step does not show progress bar
21
+ })
22
+ ),
23
+ [o, r]
20
24
  );
21
- return /* @__PURE__ */ i(c, { machine: n, onEvent: r });
25
+ return /* @__PURE__ */ i(c, { machine: t, onEvent: e });
22
26
  };
23
27
  export {
24
- b as OnboardingFlow
28
+ v as OnboardingFlow
25
29
  };
26
30
  //# sourceMappingURL=OnboardingFlow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingFlow.js","sources":["../../../../src/components/Company/OnboardingFlow/OnboardingFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { onboardingMachine } from './onboardingStateMachine'\nimport type { OnboardingFlowProps } from './OnboardingFlowComponents'\nimport {\n OnboardingOverviewContextual,\n type OnboardingFlowContextInterface,\n} from './OnboardingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\n\nexport const OnboardingFlow = ({ companyId, onEvent, defaultValues }: OnboardingFlowProps) => {\n const onboardingFlow = createMachine(\n 'overview',\n onboardingMachine,\n (initialContext: OnboardingFlowContextInterface) => ({\n ...initialContext,\n component: OnboardingOverviewContextual,\n companyId,\n defaultValues,\n totalSteps: 8,\n currentStep: 1,\n showProgress: false, //Overview step does not show progress bar\n }),\n )\n return <Flow machine={onboardingFlow} onEvent={onEvent} />\n}\n"],"names":["OnboardingFlow","companyId","onEvent","defaultValues","onboardingFlow","createMachine","onboardingMachine","initialContext","OnboardingOverviewContextual","jsx","Flow"],"mappings":";;;;;AASO,MAAMA,IAAiB,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,eAAAC,QAAyC;AAC5F,QAAMC,IAAiBC;AAAA,IACrB;AAAA,IACAC;AAAA,IACA,CAACC,OAAoD;AAAA,MACnD,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,WAAAP;AAAA,MACA,eAAAE;AAAA,MACA,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,cAAc;AAAA;AAAA,IAAA;AAAA,EAChB;AAEF,SAAO,gBAAAM,EAACC,GAAA,EAAK,SAASN,GAAgB,SAAAF,EAAA,CAAkB;AAC1D;"}
1
+ {"version":3,"file":"OnboardingFlow.js","sources":["../../../../src/components/Company/OnboardingFlow/OnboardingFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { onboardingMachine } from './onboardingStateMachine'\nimport type { OnboardingFlowProps } from './OnboardingFlowComponents'\nimport {\n OnboardingOverviewContextual,\n type OnboardingFlowContextInterface,\n} from './OnboardingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\n\nexport const OnboardingFlow = ({ companyId, onEvent, defaultValues }: OnboardingFlowProps) => {\n const onboardingFlow = useMemo(\n () =>\n createMachine(\n 'overview',\n onboardingMachine,\n (initialContext: OnboardingFlowContextInterface) => ({\n ...initialContext,\n component: OnboardingOverviewContextual,\n companyId,\n defaultValues,\n totalSteps: 8,\n currentStep: 1,\n showProgress: false, //Overview step does not show progress bar\n }),\n ),\n [companyId, defaultValues],\n )\n return <Flow machine={onboardingFlow} onEvent={onEvent} />\n}\n"],"names":["OnboardingFlow","companyId","onEvent","defaultValues","onboardingFlow","useMemo","createMachine","onboardingMachine","initialContext","OnboardingOverviewContextual","jsx","Flow"],"mappings":";;;;;;AAUO,MAAMA,IAAiB,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,eAAAC,QAAyC;AAC5F,QAAMC,IAAiBC;AAAA,IACrB,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAR;AAAA,QACA,eAAAE;AAAA,QACA,YAAY;AAAA,QACZ,aAAa;AAAA,QACb,cAAc;AAAA;AAAA,MAAA;AAAA,IAChB;AAAA,IAEJ,CAACF,GAAWE,CAAa;AAAA,EAAA;AAE3B,SAAO,gBAAAO,EAACC,GAAA,EAAK,SAASP,GAAgB,SAAAF,EAAA,CAAkB;AAC1D;"}
@@ -1,18 +1,19 @@
1
- import { jsxs as i, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as m } from "react-i18next";
3
3
  import { useOnboardingOverview as l } from "./context.js";
4
- import { Flex as a } from "../../Common/Flex/Flex.js";
4
+ import { Flex as p } from "../../Common/Flex/Flex.js";
5
5
  import "classnames";
6
- import { useComponentContext as d } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const f = () => {
8
- const e = d(), { onboardingCompleted: t, handleDone: r } = l(), { t: n } = m("Company.OnboardingOverview");
9
- return t ? /* @__PURE__ */ i(a, { alignItems: "center", flexDirection: "column", gap: 8, children: [
10
- /* @__PURE__ */ o(e.Heading, { as: "h2", textAlign: "center", children: n("onboardingCompletedTitle") }),
11
- /* @__PURE__ */ o("p", { children: n("onboardingCompletedDescription") }),
12
- /* @__PURE__ */ o(e.Button, { variant: "secondary", onClick: r, children: n("onboardingCompletedCta") })
6
+ import "../../../shared/constants.js";
7
+ import { useComponentContext as a } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ const x = () => {
9
+ const e = a(), { onboardingCompleted: t, handleDone: r } = l(), { t: o } = m("Company.OnboardingOverview");
10
+ return t ? /* @__PURE__ */ i(p, { alignItems: "center", flexDirection: "column", gap: 8, children: [
11
+ /* @__PURE__ */ n(e.Heading, { as: "h2", textAlign: "center", children: o("onboardingCompletedTitle") }),
12
+ /* @__PURE__ */ n("p", { children: o("onboardingCompletedDescription") }),
13
+ /* @__PURE__ */ n(e.Button, { variant: "secondary", onClick: r, children: o("onboardingCompletedCta") })
13
14
  ] }) : null;
14
15
  };
15
16
  export {
16
- f as Completed
17
+ x as Completed
17
18
  };
18
19
  //# 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;"}
@@ -1,17 +1,18 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as p } from "react-i18next";
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
+ 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 { RequirementsList as d } from "../../Common/RequirementsList/RequirementsList.js";
8
9
  import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
- const b = () => {
10
- const r = g(), { onboardingSteps: n, onboardingCompleted: s, handleContinue: m } = a(), { t: e } = p("Company.OnboardingOverview");
10
+ const D = () => {
11
+ const r = g(), { onboardingSteps: n, onboardingCompleted: s, handleContinue: m } = a(), { t: e } = l("Company.OnboardingOverview");
11
12
  if (s)
12
13
  return null;
13
14
  const o = !n?.some((i) => i.required && i.completed);
14
- return /* @__PURE__ */ l(c, { flexDirection: "column", alignItems: "flex-start", gap: 8, children: [
15
+ return /* @__PURE__ */ p(c, { flexDirection: "column", alignItems: "flex-start", gap: 8, children: [
15
16
  /* @__PURE__ */ t(r.Heading, { as: "h2", children: e(o ? "initialSetupTitle" : "missingRequirementsTitle") }),
16
17
  /* @__PURE__ */ t("p", { children: e(o ? "initialSetupDescription" : "missingRequirementsDescription") }),
17
18
  n && /* @__PURE__ */ t(
@@ -28,6 +29,6 @@ const b = () => {
28
29
  ] });
29
30
  };
30
31
  export {
31
- b as MissingRequirements
32
+ D as MissingRequirements
32
33
  };
33
34
  //# 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,10 +7,9 @@ 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";
12
11
  import { componentEvents as i } from "../../../shared/constants.js";
13
- function A(o) {
12
+ function j(o) {
14
13
  return C("Company.OnboardingOverview"), g("Company.OnboardingOverview", o.dictionary), /* @__PURE__ */ n(f, { ...o, children: /* @__PURE__ */ n(b, { ...o, children: o.children }) });
15
14
  }
16
15
  const b = ({ companyId: o, className: t, children: e }) => {
@@ -36,6 +35,6 @@ const b = ({ companyId: o, className: t, children: e }) => {
36
35
  ) });
37
36
  };
38
37
  export {
39
- A as OnboardingOverview
38
+ j as OnboardingOverview
40
39
  };
41
40
  //# sourceMappingURL=OnboardingOverview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingOverview.js","sources":["../../../../src/components/Company/OnboardingOverview/OnboardingOverview.tsx"],"sourcesContent":["import { useCompaniesGetOnboardingStatusSuspense } from '@gusto/embedded-api/react-query/companiesGetOnboardingStatus'\nimport { OnboardingOverviewProvider } from './context'\nimport { MissingRequirements } from './MissingRequirements'\nimport { Completed } from './Completed'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface OnboardingOverviewProps extends CommonComponentInterface<'Company.OnboardingOverview'> {\n companyId: string\n}\n\nexport function OnboardingOverview(props: OnboardingOverviewProps & BaseComponentInterface) {\n useI18n('Company.OnboardingOverview')\n useComponentDictionary('Company.OnboardingOverview', props.dictionary)\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, className, children }: OnboardingOverviewProps) => {\n const { onEvent } = useBase()\n\n const { data } = useCompaniesGetOnboardingStatusSuspense({ companyUuid: companyId })\n const { onboardingCompleted, onboardingSteps } = data.companyOnboardingStatus!\n\n const handleDone = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_DONE)\n }\n const handleContinue = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_CONTINUE)\n }\n\n return (\n <section className={className}>\n <OnboardingOverviewProvider\n value={{\n onboardingCompleted,\n onboardingSteps,\n handleDone,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Completed />\n <MissingRequirements />\n </>\n )}\n </Flex>\n </OnboardingOverviewProvider>\n </section>\n )\n}\n"],"names":["OnboardingOverview","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","companyId","className","children","onEvent","useBase","data","useCompaniesGetOnboardingStatusSuspense","onboardingCompleted","onboardingSteps","OnboardingOverviewProvider","componentEvents","Flex","jsxs","Fragment","Completed","MissingRequirements"],"mappings":";;;;;;;;;;;;AAmBO,SAASA,EAAmBC,GAAyD;AAC1F,SAAAC,EAAQ,4BAA4B,GACpCC,EAAuB,8BAA8BF,EAAM,UAAU,GAEnE,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,QAAwC;AAC5E,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,EAAA,IAASC,EAAwC,EAAE,aAAaN,GAAW,GAC7E,EAAE,qBAAAO,GAAqB,iBAAAC,EAAA,IAAoBH,EAAK;AAStD,SACE,gBAAAR,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,qBAAAF;AAAA,QACA,iBAAAC;AAAA,QACA,YAbW,MAAM;AACvB,UAAAL,EAAQO,EAAgB,qBAAqB;AAAA,QAC/C;AAAA,QAYQ,gBAXe,MAAM;AAC3B,UAAAP,EAAQO,EAAgB,yBAAyB;AAAA,QACnD;AAAA,MASQ;AAAA,MAGF,UAAA,gBAAAb,EAACc,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,KAGC,gBAAAU,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAhB,EAACiB,GAAA,EAAU;AAAA,0BACVC,GAAA,CAAA,CAAoB;AAAA,MAAA,EAAA,CACvB,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"OnboardingOverview.js","sources":["../../../../src/components/Company/OnboardingOverview/OnboardingOverview.tsx"],"sourcesContent":["import { useCompaniesGetOnboardingStatusSuspense } from '@gusto/embedded-api/react-query/companiesGetOnboardingStatus'\nimport { OnboardingOverviewProvider } from './context'\nimport { MissingRequirements } from './MissingRequirements'\nimport { Completed } from './Completed'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface OnboardingOverviewProps extends CommonComponentInterface<'Company.OnboardingOverview'> {\n companyId: string\n}\n\nexport function OnboardingOverview(props: OnboardingOverviewProps & BaseComponentInterface) {\n useI18n('Company.OnboardingOverview')\n useComponentDictionary('Company.OnboardingOverview', props.dictionary)\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, className, children }: OnboardingOverviewProps) => {\n const { onEvent } = useBase()\n\n const { data } = useCompaniesGetOnboardingStatusSuspense({ companyUuid: companyId })\n const { onboardingCompleted, onboardingSteps } = data.companyOnboardingStatus!\n\n const handleDone = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_DONE)\n }\n const handleContinue = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_CONTINUE)\n }\n\n return (\n <section className={className}>\n <OnboardingOverviewProvider\n value={{\n onboardingCompleted,\n onboardingSteps,\n handleDone,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Completed />\n <MissingRequirements />\n </>\n )}\n </Flex>\n </OnboardingOverviewProvider>\n </section>\n )\n}\n"],"names":["OnboardingOverview","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","companyId","className","children","onEvent","useBase","data","useCompaniesGetOnboardingStatusSuspense","onboardingCompleted","onboardingSteps","OnboardingOverviewProvider","componentEvents","Flex","jsxs","Fragment","Completed","MissingRequirements"],"mappings":";;;;;;;;;;;AAmBO,SAASA,EAAmBC,GAAyD;AAC1F,SAAAC,EAAQ,4BAA4B,GACpCC,EAAuB,8BAA8BF,EAAM,UAAU,GAEnE,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,QAAwC;AAC5E,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,EAAA,IAASC,EAAwC,EAAE,aAAaN,GAAW,GAC7E,EAAE,qBAAAO,GAAqB,iBAAAC,EAAA,IAAoBH,EAAK;AAStD,SACE,gBAAAR,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,qBAAAF;AAAA,QACA,iBAAAC;AAAA,QACA,YAbW,MAAM;AACvB,UAAAL,EAAQO,EAAgB,qBAAqB;AAAA,QAC/C;AAAA,QAYQ,gBAXe,MAAM;AAC3B,UAAAP,EAAQO,EAAgB,yBAAyB;AAAA,QACnD;AAAA,MASQ;AAAA,MAGF,UAAA,gBAAAb,EAACc,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,KAGC,gBAAAU,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAhB,EAACiB,GAAA,EAAU;AAAA,0BACVC,GAAA,CAAA,CAAoB;AAAA,MAAA,EAAA,CACvB,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1,4 +1,4 @@
1
- import { jsx as a, jsxs as I } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as I } from "react/jsx-runtime";
2
2
  import { useForm as j, FormProvider as k } from "react-hook-form";
3
3
  import { zodResolver as G } from "@hookform/resolvers/zod";
4
4
  import { useState as A, useEffect as _ } from "react";
@@ -11,32 +11,31 @@ import { Form as Z } from "../../Common/Form/Form.js";
11
11
  import { BaseComponent as $ } from "../../Base/Base.js";
12
12
  import { useBase as V } from "../../Base/useBase.js";
13
13
  import { Flex as ee } from "../../Common/Flex/Flex.js";
14
- import "react-i18next";
15
14
  import "classnames";
16
- import { useI18n as oe, useComponentDictionary as re } from "../../../i18n/I18n.js";
17
15
  import { componentEvents as S } from "../../../shared/constants.js";
16
+ import { useI18n as oe, useComponentDictionary as re } from "../../../i18n/I18n.js";
18
17
  import { formatDateToStringDate as l } from "../../../helpers/dateFormatting.js";
19
- import { Head as te } from "./_parts/Head.js";
20
- import { List as ae } from "./_parts/List.js";
18
+ import { Head as ae } from "./_parts/Head.js";
19
+ import { List as te } from "./_parts/List.js";
21
20
  import { Edit as ne } from "./_parts/Edit.js";
22
21
  import { Actions as ce } from "./_parts/Actions.js";
23
- const He = ({
22
+ const Oe = ({
24
23
  companyId: n,
25
24
  defaultValues: s,
26
- dictionary: t,
27
- ...m
28
- }) => (oe("Company.PaySchedule"), re("Company.PaySchedule", t), /* @__PURE__ */ a($, { ...m, children: /* @__PURE__ */ a(ie, { companyId: n, defaultValues: s, children: m.children }) })), ie = ({ companyId: n, children: s, defaultValues: t }) => {
29
- const { baseSubmitHandler: m, onEvent: u, fieldErrors: h, setError: C } = V(), { data: p } = K({
25
+ dictionary: a,
26
+ ...y
27
+ }) => (oe("Company.PaySchedule"), re("Company.PaySchedule", a), /* @__PURE__ */ t($, { ...y, children: /* @__PURE__ */ t(ie, { companyId: n, defaultValues: s, children: y.children }) })), ie = ({ companyId: n, children: s, defaultValues: a }) => {
28
+ const { baseSubmitHandler: y, onEvent: u, fieldErrors: h, setError: C } = V(), { data: p } = K({
30
29
  companyId: n
31
- }), [i, y] = A(
30
+ }), [i, P] = A(
32
31
  p.payScheduleList?.length === 0 ? "ADD_PAY_SCHEDULE" : "LIST_PAY_SCHEDULES"
33
32
  ), [f, w] = A(null), L = {
34
- frequency: t?.frequency ?? "Every week",
35
- anchorPayDate: t?.anchorPayDate ? new Date(t.anchorPayDate) : void 0,
36
- anchorEndOfPayPeriod: t?.anchorEndOfPayPeriod ? new Date(t.anchorEndOfPayPeriod) : void 0,
37
- day1: t?.day1 ?? void 0,
38
- day2: t?.day2 ?? void 0,
39
- customName: t?.customName ?? "",
33
+ frequency: a?.frequency ?? "Every week",
34
+ anchorPayDate: a?.anchorPayDate ? new Date(a.anchorPayDate) : void 0,
35
+ anchorEndOfPayPeriod: a?.anchorEndOfPayPeriod ? new Date(a.anchorEndOfPayPeriod) : void 0,
36
+ day1: a?.day1 ?? void 0,
37
+ day2: a?.day2 ?? void 0,
38
+ customName: a?.customName ?? "",
40
39
  customTwicePerMonth: "false"
41
40
  }, q = Q(), T = J(), E = j({
42
41
  resolver: G(W),
@@ -64,9 +63,9 @@ const He = ({
64
63
  e.frequency === "Twice per month" && e.day1 === 15 && e.day2 === 31 && e.customTwicePerMonth === void 0 ? D("customTwicePerMonth", "1st15th") : e.frequency === "Twice per month" && e.customTwicePerMonth === void 0 && D("customTwicePerMonth", "custom");
65
64
  }, [e.frequency, e.day1, e.day2, D, e.customTwicePerMonth]);
66
65
  const b = () => {
67
- y("ADD_PAY_SCHEDULE"), d({});
66
+ P("ADD_PAY_SCHEDULE"), d({});
68
67
  }, g = () => {
69
- y("LIST_PAY_SCHEDULES"), d({}), H(), C(null);
68
+ P("LIST_PAY_SCHEDULES"), d({}), H(), C(null);
70
69
  }, B = (o) => {
71
70
  d({
72
71
  frequency: o.frequency,
@@ -75,20 +74,20 @@ const He = ({
75
74
  day1: o.day1 ?? void 0,
76
75
  day2: o.day2 ?? void 0,
77
76
  customName: o.customName ?? ""
78
- }), w(o), y("EDIT_PAY_SCHEDULE");
77
+ }), w(o), P("EDIT_PAY_SCHEDULE");
79
78
  }, x = () => {
80
79
  u(S.PAY_SCHEDULE_DONE);
81
80
  }, R = async (o) => {
82
- await m(o, async (r) => {
83
- const P = (c) => c && l(c) || "";
81
+ await y(o, async (r) => {
82
+ const m = (c) => c && l(c) || "";
84
83
  if (i === "ADD_PAY_SCHEDULE") {
85
84
  const c = await q.mutateAsync({
86
85
  request: {
87
86
  companyId: n,
88
87
  requestBody: {
89
88
  frequency: r.frequency,
90
- anchorPayDate: P(r.anchorPayDate),
91
- anchorEndOfPayPeriod: P(r.anchorEndOfPayPeriod),
89
+ anchorPayDate: m(r.anchorPayDate),
90
+ anchorEndOfPayPeriod: m(r.anchorEndOfPayPeriod),
92
91
  customName: r.customName,
93
92
  day1: r.day1,
94
93
  day2: r.day2
@@ -103,8 +102,8 @@ const He = ({
103
102
  companyId: n,
104
103
  requestBody: {
105
104
  frequency: r.frequency,
106
- anchorPayDate: P(r.anchorPayDate),
107
- anchorEndOfPayPeriod: P(r.anchorEndOfPayPeriod),
105
+ anchorPayDate: m(r.anchorPayDate),
106
+ anchorEndOfPayPeriod: m(r.anchorEndOfPayPeriod),
108
107
  customName: r.customName,
109
108
  day1: r.day1,
110
109
  day2: r.day2,
@@ -114,10 +113,10 @@ const He = ({
114
113
  });
115
114
  u(S.PAY_SCHEDULE_UPDATED, F), d();
116
115
  }
117
- y("LIST_PAY_SCHEDULES");
116
+ P("LIST_PAY_SCHEDULES");
118
117
  });
119
118
  };
120
- return /* @__PURE__ */ a(
119
+ return /* @__PURE__ */ t(
121
120
  X,
122
121
  {
123
122
  value: {
@@ -132,16 +131,16 @@ const He = ({
132
131
  payPreviewLoading: N,
133
132
  currentPaySchedule: f
134
133
  },
135
- children: /* @__PURE__ */ a("span", { "data-testid": "pay-schedule-edit-form", children: /* @__PURE__ */ a(k, { ...E, children: /* @__PURE__ */ a(Z, { onSubmit: E.handleSubmit(R), children: s || /* @__PURE__ */ I(ee, { flexDirection: "column", children: [
136
- /* @__PURE__ */ a(te, {}),
137
- /* @__PURE__ */ a(ae, {}),
138
- /* @__PURE__ */ a(ne, {}),
139
- /* @__PURE__ */ a(ce, {})
134
+ children: /* @__PURE__ */ t("span", { "data-testid": "pay-schedule-edit-form", children: /* @__PURE__ */ t(k, { ...E, children: /* @__PURE__ */ t(Z, { onSubmit: E.handleSubmit(R), children: s || /* @__PURE__ */ I(ee, { flexDirection: "column", children: [
135
+ /* @__PURE__ */ t(ae, {}),
136
+ /* @__PURE__ */ t(te, {}),
137
+ /* @__PURE__ */ t(ne, {}),
138
+ /* @__PURE__ */ t(ce, {})
140
139
  ] }) }) }) })
141
140
  }
142
141
  );
143
142
  };
144
143
  export {
145
- He as PaySchedule
144
+ Oe as PaySchedule
146
145
  };
147
146
  //# sourceMappingURL=PaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Frequency } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayschedules'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, fieldErrors, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.payScheduleList?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors) {\n // TODO: These error messages are not being localized correctly\n fieldErrors.forEach(error => {\n setError(error.key as keyof PayScheduleInputs, { message: error.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n anchorPayDate: formattedAnchorPayDate,\n anchorEndOfPayPeriod: formattedAnchorEndOfPayPeriod,\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n },\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as Frequency,\n anchorPayDate: schedule.anchorPayDate ? new Date(schedule.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod)\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n paySchedules: paySchedules.payScheduleList,\n payPeriodPreview: payPreviewData?.object?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","fieldErrors","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","useEffect","error","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","jsxs","Flex","Head","List","Edit","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAMA,KAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,GAAQ,qBAAqB,GAC7BC,GAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,MAAK,WAAAR,GAAsB,eAAAC,GACzB,UAAAE,EAAM,SAAA,CACT,EAAA,CACF,IAIEK,KAAO,CAAC,EAAE,WAAAR,GAAW,UAAAS,GAAU,eAAAR,QAAsC;AACzE,QAAM,EAAE,mBAAAS,GAAmB,SAAAC,GAAS,aAAAC,GAAa,UAAUC,EAAA,IAAiBC,EAAA,GAEtE,EAAE,MAAMC,EAAA,IAAiBC,EAA8B;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B2B,GAAgB,QAAQ;AAAA,QAC1C,mBAAmBC;AAAA,QACnB,oBAAAvB;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAd,EAAC,UAAK,eAAY,0BAChB,4BAACsD,GAAA,EAAc,GAAGjC,GAChB,UAAA,gBAAArB,EAACuD,GAAA,EAAK,UAAUlC,EAAY,aAAawB,CAAQ,GAC9C,UAAA1C,KAGC,gBAAAqD,EAACC,IAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAzD,EAAC0D,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Frequency } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayschedules'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, fieldErrors, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.payScheduleList?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors) {\n // TODO: These error messages are not being localized correctly\n fieldErrors.forEach(error => {\n setError(error.key as keyof PayScheduleInputs, { message: error.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n anchorPayDate: formattedAnchorPayDate,\n anchorEndOfPayPeriod: formattedAnchorEndOfPayPeriod,\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n },\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as Frequency,\n anchorPayDate: schedule.anchorPayDate ? new Date(schedule.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod)\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n paySchedules: paySchedules.payScheduleList,\n payPeriodPreview: payPreviewData?.object?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","fieldErrors","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","useEffect","error","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","jsxs","Flex","Head","List","Edit","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+BO,MAAMA,KAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,GAAQ,qBAAqB,GAC7BC,GAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,MAAK,WAAAR,GAAsB,eAAAC,GACzB,UAAAE,EAAM,SAAA,CACT,EAAA,CACF,IAIEK,KAAO,CAAC,EAAE,WAAAR,GAAW,UAAAS,GAAU,eAAAR,QAAsC;AACzE,QAAM,EA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AA,QACA,YAAAE;AAAA,QACA,cAAAD;AAAA,QACA,gBAAAG;AAAA,QACA,MAAAhC;AAAA,QACA,cAAcF,EAAa;AAAA,QAC3B,kBAAkB2B,GAAgB,QAAQ;AAAA,QAC1C,mBAAmBC;AAAA,QACnB,oBAAAvB;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAd,EAAC,UAAK,eAAY,0BAChB,4BAACsD,GAAA,EAAc,GAAGjC,GAChB,UAAA,gBAAArB,EAACuD,GAAA,EAAK,UAAUlC,EAAY,aAAawB,CAAQ,GAC9C,UAAA1C,KAGC,gBAAAqD,EAACC,IAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAzD,EAAC0D,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -2,12 +2,13 @@ import { jsxs as e, Fragment as d, jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as l } from "react-i18next";
3
3
  import { usePaySchedule as m } from "../usePaySchedule.js";
4
4
  import "classnames";
5
- import { ActionsLayout as i } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import "../../../../shared/constants.js";
6
+ import { ActionsLayout as r } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const E = () => {
8
- const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: a, handleCancel: r, handleContinue: s } = m(), t = u();
8
+ const v = () => {
9
+ const { t: n } = l("Company.PaySchedule"), { mode: i, handleAdd: a, handleCancel: c, handleContinue: s } = m(), t = u();
9
10
  return /* @__PURE__ */ e(d, { children: [
10
- c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(i, { children: [
11
+ i === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(r, { children: [
11
12
  /* @__PURE__ */ o(
12
13
  t.Button,
13
14
  {
@@ -29,26 +30,26 @@ const E = () => {
29
30
  }
30
31
  )
31
32
  ] }),
32
- c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
33
+ i === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
33
34
  /* @__PURE__ */ o(
34
35
  t.Button,
35
36
  {
36
37
  variant: "secondary",
37
38
  onClick: () => {
38
- r();
39
+ c();
39
40
  },
40
41
  children: n("actions.cancel")
41
42
  }
42
43
  ),
43
44
  /* @__PURE__ */ o(t.Button, { type: "submit", children: n("actions.save") })
44
45
  ] }),
45
- c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
46
+ i === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
46
47
  /* @__PURE__ */ o(
47
48
  t.Button,
48
49
  {
49
50
  variant: "secondary",
50
51
  onClick: () => {
51
- r();
52
+ c();
52
53
  },
53
54
  children: n("actions.cancel")
54
55
  }
@@ -58,6 +59,6 @@ const E = () => {
58
59
  ] });
59
60
  };
60
61
  export {
61
- E as Actions
62
+ v as Actions
62
63
  };
63
64
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAA,GACpDC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR,MAAS,0CACPS,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAJ,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAAA;AAAA,MAE/B,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,GACtD;AAAA,IAEDE,MAAS,uBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,EAAA,CACtD;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAA,GACpDC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR,MAAS,0CACPS,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAJ,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAAA;AAAA,MAE/B,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,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