@gusto/embedded-react-sdk 0.12.3 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/_virtual/dynamic-import-helper.js +8 -1
  3. package/dist/_virtual/dynamic-import-helper.js.map +1 -1
  4. package/dist/assets/icons/spinner_small.svg.js +10 -0
  5. package/dist/assets/icons/spinner_small.svg.js.map +1 -0
  6. package/dist/components/Base/Base.js +28 -27
  7. package/dist/components/Base/Base.js.map +1 -1
  8. package/dist/components/Base/useBase.d.ts +2 -0
  9. package/dist/components/Base/useBase.js.map +1 -1
  10. package/dist/components/Common/DataView/DataView.d.ts +2 -1
  11. package/dist/components/Common/DataView/DataView.js +20 -19
  12. package/dist/components/Common/DataView/DataView.js.map +1 -1
  13. package/dist/components/Common/DataView/useDataView.d.ts +3 -1
  14. package/dist/components/Common/DataView/useDataView.js +13 -11
  15. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  16. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
  17. package/dist/components/Common/FieldDescription/FieldDescription.js +7 -14
  18. package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -1
  19. package/dist/components/Common/Fields/hooks/useField.d.ts +4 -1
  20. package/dist/components/Common/Fields/hooks/useField.js +31 -24
  21. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  22. package/dist/components/Common/InlineSpinner/InlineSpinner.d.ts +6 -0
  23. package/dist/components/Common/InlineSpinner/InlineSpinner.js +25 -0
  24. package/dist/components/Common/InlineSpinner/InlineSpinner.js.map +1 -0
  25. package/dist/components/Common/InlineSpinner/InlineSpinner.module.scss.js +10 -0
  26. package/dist/components/Common/InlineSpinner/InlineSpinner.module.scss.js.map +1 -0
  27. package/dist/components/Common/InlineSpinner/index.d.ts +2 -0
  28. package/dist/components/Common/PaginationControl/PaginationControl.js +31 -28
  29. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  30. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -0
  31. package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
  32. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +1 -1
  33. package/dist/components/Common/UI/DatePicker/DatePicker.js +1 -1
  34. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  35. package/dist/components/Common/UI/Tabs/Tabs.d.ts +7 -0
  36. package/dist/components/Common/UI/Tabs/Tabs.js +25 -0
  37. package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -0
  38. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +8 -0
  39. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js.map +1 -0
  40. package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +51 -0
  41. package/dist/components/Common/UI/Tabs/index.d.ts +3 -0
  42. package/dist/components/Common/hooks/useNumberFormatter.js +1 -1
  43. package/dist/components/Common/index.d.ts +1 -0
  44. package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
  45. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +5 -5
  46. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +2 -2
  47. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +9 -3
  48. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +4 -4
  50. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +9 -3
  51. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  52. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +11 -5
  53. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  54. package/dist/components/Company/BankAccount/BankAccount.js +1 -1
  55. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +2 -2
  56. package/dist/components/Company/BankAccount/BankAccountForm/context.js +9 -3
  57. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  58. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
  59. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +2 -2
  60. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
  61. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +9 -3
  62. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  63. package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
  64. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -3
  65. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +9 -3
  66. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  67. package/dist/components/Company/FederalTaxes/FederalTaxes.js +3 -3
  68. package/dist/components/Company/FederalTaxes/Form.js +1 -1
  69. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +18 -12
  70. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  71. package/dist/components/Company/Industry/Context.js +12 -6
  72. package/dist/components/Company/Industry/Context.js.map +1 -1
  73. package/dist/components/Company/Industry/Industry.js +2 -2
  74. package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -4
  75. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +9 -3
  76. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  77. package/dist/components/Company/Locations/LocationsList/LocationsList.js +1 -1
  78. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +9 -3
  79. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  80. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +1 -1
  81. package/dist/components/Company/OnboardingOverview/context.js +9 -3
  82. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  83. package/dist/components/Company/PaySchedule/PaySchedule.js +5 -5
  84. package/dist/components/Company/PaySchedule/usePaySchedule.js +12 -6
  85. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  86. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +3 -3
  87. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +9 -3
  88. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  89. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +1 -1
  90. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +9 -3
  91. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  92. package/dist/components/Contractor/Address/Address.js +4 -4
  93. package/dist/components/Contractor/Address/useAddress.js +11 -5
  94. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  95. package/dist/components/Contractor/ContractorList/index.js +1 -1
  96. package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
  97. package/dist/components/Contractor/NewHireReport/NewHireReport.js +52 -50
  98. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  99. package/dist/components/Contractor/NewHireReport/types.d.ts +1 -0
  100. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +19 -12
  101. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  102. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +6 -5
  103. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  104. package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +4 -4
  105. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +7 -7
  106. package/dist/components/Contractor/Profile/ContractorProfile.js +1 -1
  107. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +19 -19
  108. package/dist/components/Contractor/Profile/useContractorProfile.js +40 -35
  109. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  110. package/dist/components/Contractor/Submit/Submit.js +25 -25
  111. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  112. package/dist/components/Employee/Compensation/Compensation.js +10 -10
  113. package/dist/components/Employee/Deductions/Deductions.js +1 -1
  114. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +4 -4
  115. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +2 -2
  116. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +1 -1
  117. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
  118. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +9 -3
  119. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  120. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +3 -3
  121. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +9 -3
  122. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  123. package/dist/components/Employee/EmployeeList/EmployeeList.js +75 -62
  124. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  125. package/dist/components/Employee/EmployeeList/List.js +27 -25
  126. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  127. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +1 -0
  128. package/dist/components/Employee/EmployeeList/useEmployeeList.js +9 -3
  129. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  130. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +3 -3
  131. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +9 -3
  132. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  133. package/dist/components/Employee/Landing/Landing.js +2 -2
  134. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +2 -2
  135. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +2 -2
  136. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +8 -8
  137. package/dist/components/Employee/PaymentMethod/Split.js +1 -1
  138. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +8 -8
  139. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +15 -9
  140. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  141. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +2 -2
  142. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
  143. package/dist/components/Employee/Profile/Profile.js +15 -13
  144. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  145. package/dist/components/Employee/Profile/useProfile.js +9 -3
  146. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  147. package/dist/components/Employee/StateTaxes/StateTaxes.js +3 -3
  148. package/dist/components/Employee/StateTaxes/useStateTaxes.js +9 -3
  149. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  150. package/dist/components/Employee/Taxes/Taxes.js +5 -5
  151. package/dist/components/Employee/Taxes/useTaxes.js +9 -3
  152. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  153. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +4 -2
  154. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +69 -33
  155. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  156. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +10 -5
  157. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +119 -50
  158. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  159. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +5 -2
  160. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +64 -13
  161. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  162. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +18 -2
  163. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +117 -18
  164. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  165. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +1 -1
  166. package/dist/components/Payroll/PayrollList/PayrollList.js +24 -11
  167. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  168. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +8 -6
  169. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +35 -26
  170. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  171. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +1 -1
  172. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +42 -35
  173. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  174. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +2 -1
  175. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +4 -4
  176. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
  177. package/dist/components/Payroll/helpers.d.ts +21 -0
  178. package/dist/components/Payroll/helpers.js +209 -0
  179. package/dist/components/Payroll/helpers.js.map +1 -0
  180. package/dist/components/Payroll/helpers.test.d.ts +1 -0
  181. package/dist/components/Payroll/usePreparedPayrollData.d.ts +14 -0
  182. package/dist/components/Payroll/usePreparedPayrollData.js +39 -0
  183. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -0
  184. package/dist/contexts/ApiProvider/ApiProvider.js +4 -4
  185. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +28 -26
  186. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  187. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  188. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  189. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  190. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  191. package/dist/helpers/formattedStrings.d.ts +9 -0
  192. package/dist/helpers/formattedStrings.js +55 -16
  193. package/dist/helpers/formattedStrings.js.map +1 -1
  194. package/dist/i18n/I18n.js +15 -15
  195. package/dist/i18n/I18n.js.map +1 -1
  196. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +32 -0
  197. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -0
  198. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +20 -0
  199. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -0
  200. package/dist/i18n/en/Payroll.PayrollList.json.js +14 -0
  201. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -0
  202. package/dist/i18n/en/Payroll.PayrollOverview.json.js +18 -0
  203. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -0
  204. package/dist/i18n/en/common.json.d.ts +8 -0
  205. package/dist/i18n/en/common.json.js +15 -13
  206. package/dist/i18n/en/common.json.js.map +1 -1
  207. package/dist/shared/constants.d.ts +6 -0
  208. package/dist/shared/constants.js +43 -34
  209. package/dist/shared/constants.js.map +1 -1
  210. package/dist/style.css +1 -1
  211. package/dist/types/i18next.d.ts +96 -1
  212. package/package.json +27 -26
@@ -1,17 +1,17 @@
1
1
  import { jsx as s, jsxs as te, Fragment as oe } from "react/jsx-runtime";
2
- import { zodResolver as ne } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@hookform/resolvers/zod/dist/zod.mjs";
2
+ import { zodResolver as ne } from "@hookform/resolvers/zod";
3
3
  import { useState as P, useMemo as U, useEffect as se } from "react";
4
4
  import { useForm as ae, FormProvider as re } from "react-hook-form";
5
5
  import { useTranslation as ie } from "react-i18next";
6
- import { useJobsAndCompensationsGetJobsSuspense as me } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/jobsAndCompensationsGetJobs.js";
7
- import { useJobsAndCompensationsCreateJobMutation as ue } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/jobsAndCompensationsCreateJob.js";
8
- import { useJobsAndCompensationsUpdateMutation as de } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/jobsAndCompensationsUpdate.js";
9
- import { useJobsAndCompensationsDeleteMutation as le } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/jobsAndCompensationsDelete.js";
10
- import { useJobsAndCompensationsUpdateCompensationMutation as ce } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/jobsAndCompensationsUpdateCompensation.js";
11
- import { useLocationsGetMinimumWagesSuspense as pe } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/locationsGetMinimumWages.js";
12
- import { useEmployeeAddressesGetWorkAddressesSuspense as fe } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeAddressesGetWorkAddresses.js";
13
- import { useFederalTaxDetailsGetSuspense as Ce } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/federalTaxDetailsGet.js";
14
- import { useEmployeesGetSuspense as Ee } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeesGet.js";
6
+ import { useJobsAndCompensationsGetJobsSuspense as me } from "@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs";
7
+ import { useJobsAndCompensationsCreateJobMutation as ue } from "@gusto/embedded-api/react-query/jobsAndCompensationsCreateJob";
8
+ import { useJobsAndCompensationsUpdateMutation as de } from "@gusto/embedded-api/react-query/jobsAndCompensationsUpdate";
9
+ import { useJobsAndCompensationsDeleteMutation as le } from "@gusto/embedded-api/react-query/jobsAndCompensationsDelete";
10
+ import { useJobsAndCompensationsUpdateCompensationMutation as ce } from "@gusto/embedded-api/react-query/jobsAndCompensationsUpdateCompensation";
11
+ import { useLocationsGetMinimumWagesSuspense as pe } from "@gusto/embedded-api/react-query/locationsGetMinimumWages";
12
+ import { useEmployeeAddressesGetWorkAddressesSuspense as fe } from "@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses";
13
+ import { useFederalTaxDetailsGetSuspense as Ce } from "@gusto/embedded-api/react-query/federalTaxDetailsGet";
14
+ import { useEmployeesGetSuspense as Ee } from "@gusto/embedded-api/react-query/employeesGet";
15
15
  import { List as he } from "./List.js";
16
16
  import { Head as De } from "./Head.js";
17
17
  import { Edit as Oe } from "./Edit.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as l } from "react-i18next";
3
3
  import { createMachine as D } from "robot3";
4
- import { useGarnishmentsListSuspense as f } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/garnishmentsList.js";
4
+ import { useGarnishmentsListSuspense as f } from "@gusto/embedded-api/react-query/garnishmentsList";
5
5
  import { useMemo as d } from "react";
6
6
  import { DeductionsListContextual as h, IncludeDeductionsFormContextual as F } from "./DeductionsComponents.js";
7
7
  import { deductionsStateMachine as w } from "./stateMachine.js";
@@ -3,10 +3,10 @@ import { useTranslation as N } from "react-i18next";
3
3
  import { useMemo as B, useEffect as U } from "react";
4
4
  import { z as i } from "zod";
5
5
  import { useForm as _, useWatch as I, FormProvider as w } from "react-hook-form";
6
- import { zodResolver as G } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@hookform/resolvers/zod/dist/zod.mjs";
7
- import { useGarnishmentsCreateMutation as j } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/garnishmentsCreate.js";
8
- import { useGarnishmentsUpdateMutation as Y } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/garnishmentsUpdate.js";
9
- import { useGarnishmentsListSuspense as k } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/garnishmentsList.js";
6
+ import { zodResolver as G } from "@hookform/resolvers/zod";
7
+ import { useGarnishmentsCreateMutation as j } from "@gusto/embedded-api/react-query/garnishmentsCreate";
8
+ import { useGarnishmentsUpdateMutation as Y } from "@gusto/embedded-api/react-query/garnishmentsUpdate";
9
+ import { useGarnishmentsListSuspense as k } from "@gusto/embedded-api/react-query/garnishmentsList";
10
10
  import { BaseComponent as z } from "../../../Base/Base.js";
11
11
  import { useBase as H } from "../../../Base/useBase.js";
12
12
  import { Form as V } from "../../../Common/Form/Form.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx as n, jsxs as c, Fragment as A } from "react/jsx-runtime";
2
2
  import { useTranslation as O } from "react-i18next";
3
- import { useGarnishmentsListSuspense as x } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/garnishmentsList.js";
4
- import { useGarnishmentsUpdateMutation as N } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/garnishmentsUpdate.js";
3
+ import { useGarnishmentsListSuspense as x } from "@gusto/embedded-api/react-query/garnishmentsList";
4
+ import { useGarnishmentsUpdateMutation as N } from "@gusto/embedded-api/react-query/garnishmentsUpdate";
5
5
  import { BaseComponent as _ } from "../../../Base/Base.js";
6
6
  import { useBase as k } from "../../../Base/useBase.js";
7
7
  import { Flex as w } from "../../../Common/Flex/Flex.js";
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as p, Fragment as a } from "react/jsx-runtime";
2
2
  import { useTranslation as D } from "react-i18next";
3
3
  import { z as m } from "zod";
4
4
  import { useForm as f, FormProvider as E } from "react-hook-form";
5
- import { zodResolver as h } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@hookform/resolvers/zod/dist/zod.mjs";
5
+ import { zodResolver as h } from "@hookform/resolvers/zod";
6
6
  import { BaseComponent as C } from "../../../Base/Base.js";
7
7
  import { useBase as b } from "../../../Base/useBase.js";
8
8
  import { Form as N } from "../../../Common/Form/Form.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as o, jsxs as l } from "react/jsx-runtime";
2
- import { useEmployeeFormsListSuspense as f } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeFormsList.js";
2
+ import { useEmployeeFormsListSuspense as f } from "@gusto/embedded-api/react-query/employeeFormsList";
3
3
  import { Head as d } from "./Head.js";
4
4
  import { List as E } from "./List.js";
5
5
  import { Actions as a } from "./Actions.js";
@@ -2,15 +2,21 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
+ import "@gusto/embedded-api/models/errors/apierror";
6
+ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
+ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
5
9
  import "../../../Base/useBase.js";
6
10
  import "../../../../shared/constants.js";
7
11
  import "classnames";
8
12
  import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
9
14
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
10
16
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
11
- const [x, C] = t("DocumentListContext");
17
+ const [f, v] = t("DocumentListContext");
12
18
  export {
13
- C as DocumentListProvider,
14
- x as useDocumentList
19
+ v as DocumentListProvider,
20
+ f as useDocumentList
15
21
  };
16
22
  //# sourceMappingURL=useDocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as o, jsxs as F, Fragment as E } from "react/jsx-runtime";
2
- import { useEmployeeFormsGetPdfSuspense as h } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeFormsGetPdf.js";
3
- import { useEmployeeFormsSignMutation as P } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeFormsSign.js";
4
- import { useEmployeeFormsGetSuspense as x } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeFormsGet.js";
2
+ import { useEmployeeFormsGetPdfSuspense as h } from "@gusto/embedded-api/react-query/employeeFormsGetPdf";
3
+ import { useEmployeeFormsSignMutation as P } from "@gusto/embedded-api/react-query/employeeFormsSign";
4
+ import { useEmployeeFormsGetSuspense as x } from "@gusto/embedded-api/react-query/employeeFormsGet";
5
5
  import { Form as b } from "./Form.js";
6
6
  import { Head as v } from "./Head.js";
7
7
  import { Actions as y } from "./Actions.js";
@@ -2,15 +2,21 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
+ import "@gusto/embedded-api/models/errors/apierror";
6
+ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
+ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
5
9
  import "../../../Base/useBase.js";
6
10
  import "../../../../shared/constants.js";
7
11
  import "classnames";
8
12
  import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
9
14
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
10
16
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
11
- const [x, C] = o("SignatureFormContext");
17
+ const [s, f] = o("SignatureFormContext");
12
18
  export {
13
- C as SignatureFormProvider,
14
- x as useSignatureForm
19
+ f as SignatureFormProvider,
20
+ s as useSignatureForm
15
21
  };
16
22
  //# sourceMappingURL=useSignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
1
+ {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
@@ -1,67 +1,79 @@
1
- import { jsx as o, jsxs as B } from "react/jsx-runtime";
2
- import { useState as d } from "react";
3
- import { useEmployeesListSuspense as C } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeesList.js";
4
- import { useEmployeesDeleteMutation as v } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeesDelete.js";
5
- import { useEmployeesUpdateOnboardingStatusMutation as G } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeesUpdateOnboardingStatus.js";
6
- import { EmployeeListProvider as Y } from "./useEmployeeList.js";
7
- import { Actions as F } from "./Actions.js";
8
- import { BaseComponent as U } from "../../Base/Base.js";
9
- import { useBase as W } from "../../Base/useBase.js";
10
- import { Flex as q } from "../../Common/Flex/Flex.js";
1
+ import { jsx as o, jsxs as C } from "react/jsx-runtime";
2
+ import { useState as y } from "react";
3
+ import { useEmployeesList as G } from "@gusto/embedded-api/react-query/employeesList";
4
+ import { useEmployeesDeleteMutation as F } from "@gusto/embedded-api/react-query/employeesDelete";
5
+ import { useEmployeesUpdateOnboardingStatusMutation as Y } from "@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus";
6
+ import { keepPreviousData as U } from "@tanstack/react-query";
7
+ import { EmployeeListProvider as W } from "./useEmployeeList.js";
8
+ import { Actions as k } from "./Actions.js";
9
+ import { BaseComponent as q } from "../../Base/Base.js";
10
+ import { useBase as j } from "../../Base/useBase.js";
11
+ import { Flex as H } from "../../Common/Flex/Flex.js";
11
12
  import "classnames";
12
- import { componentEvents as s, EmployeeOnboardingStatus as l } from "../../../shared/constants.js";
13
- import { useI18n as j, useComponentDictionary as k } from "../../../i18n/I18n.js";
14
- import { Head as H } from "./Head.js";
15
- import { List as V } from "./List.js";
16
- import { useFlow as z } from "../../Flow/useFlow.js";
17
- function J(n) {
18
- return /* @__PURE__ */ o(U, { ...n, children: /* @__PURE__ */ o(K, { ...n, children: n.children }) });
13
+ import { componentEvents as s, EmployeeOnboardingStatus as E } from "../../../shared/constants.js";
14
+ import { Loading as V } from "../../Common/Loading/Loading.js";
15
+ import { useI18n as z, useComponentDictionary as J } from "../../../i18n/I18n.js";
16
+ import { Head as K } from "./Head.js";
17
+ import { List as Q } from "./List.js";
18
+ import { useFlow as X } from "../../Flow/useFlow.js";
19
+ function Z(n) {
20
+ return /* @__PURE__ */ o(q, { ...n, children: /* @__PURE__ */ o($, { ...n, children: n.children }) });
19
21
  }
20
- function K({ companyId: n, className: m, children: c, dictionary: y }) {
21
- j("Employee.EmployeeList"), k("Employee.EmployeeList", y);
22
- const { onEvent: a, baseSubmitHandler: r } = W(), [p, i] = d(1), [h, P] = d(5), { data: O } = C({ companyId: n, page: p, per: h }), { httpMeta: g, showEmployees: I } = O, N = I, { mutateAsync: A } = v(), { mutateAsync: D } = G(), E = Number(g.response.headers.get("x-total-pages") ?? 1), f = (e) => {
23
- P(e);
24
- }, L = () => {
25
- i(1);
26
- }, _ = () => {
27
- i((e) => Math.max(e - 1, 1));
22
+ function $({ companyId: n, className: m, children: l, dictionary: h }) {
23
+ z("Employee.EmployeeList"), J("Employee.EmployeeList", h);
24
+ const { onEvent: a, baseSubmitHandler: r } = j(), [p, i] = y(1), [P, g] = y(5), { data: u, fetchStatus: f, isFetching: O } = G(
25
+ {
26
+ companyId: n,
27
+ page: p,
28
+ per: P
29
+ },
30
+ { placeholderData: U }
31
+ ), { mutateAsync: D } = F(), { mutateAsync: I } = Y();
32
+ if (f === "fetching" && !u)
33
+ return /* @__PURE__ */ o(V, {});
34
+ const { httpMeta: N, showEmployees: A } = u, L = A, c = Number(N.response.headers.get("x-total-pages") ?? 1), _ = (e) => {
35
+ g(e);
28
36
  }, M = () => {
29
- i((e) => Math.min(e + 1, E));
37
+ i(1);
30
38
  }, S = () => {
31
- i(E);
32
- }, w = async (e) => {
39
+ i((e) => Math.max(e - 1, 1));
40
+ }, w = () => {
41
+ i((e) => Math.min(e + 1, c));
42
+ }, b = () => {
43
+ i(c);
44
+ }, R = async (e) => {
33
45
  await r(e, async (t) => {
34
- await A({
46
+ await D({
35
47
  request: { employeeId: t }
36
48
  }), a(s.EMPLOYEE_DELETED, { employeeId: t });
37
49
  });
38
- }, b = async (e) => {
50
+ }, T = async (e) => {
39
51
  await r(e, async (t) => {
40
- await u({
52
+ await d({
41
53
  employeeId: t,
42
- status: l.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW
54
+ status: E.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW
43
55
  }), a(s.EMPLOYEE_UPDATE, {
44
56
  employeeId: t,
45
- onboardingStatus: l.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW
57
+ onboardingStatus: E.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW
46
58
  });
47
59
  });
48
- }, R = async (e) => {
60
+ }, x = async (e) => {
49
61
  await r(e, async (t) => {
50
- await u({
62
+ await d({
51
63
  employeeId: t,
52
- status: l.ADMIN_ONBOARDING_INCOMPLETE
64
+ status: E.ADMIN_ONBOARDING_INCOMPLETE
53
65
  });
54
66
  });
55
- }, u = async (e) => {
56
- await r(e, async ({ employeeId: t, status: T }) => {
57
- const { employeeOnboardingStatus: x } = await D({
58
- request: { employeeId: t, requestBody: { onboardingStatus: T } }
67
+ }, d = async (e) => {
68
+ await r(e, async ({ employeeId: t, status: v }) => {
69
+ const { employeeOnboardingStatus: B } = await I({
70
+ request: { employeeId: t, requestBody: { onboardingStatus: v } }
59
71
  });
60
- a(s.EMPLOYEE_ONBOARDING_STATUS_UPDATED, x);
72
+ a(s.EMPLOYEE_ONBOARDING_STATUS_UPDATED, B);
61
73
  });
62
74
  };
63
75
  return /* @__PURE__ */ o("section", { className: m, children: /* @__PURE__ */ o(
64
- Y,
76
+ W,
65
77
  {
66
78
  value: {
67
79
  handleEdit: (e, t) => {
@@ -70,35 +82,36 @@ function K({ companyId: n, className: m, children: c, dictionary: y }) {
70
82
  handleNew: () => {
71
83
  a(s.EMPLOYEE_CREATE);
72
84
  },
73
- handleReview: b,
74
- handleDelete: w,
75
- employees: N,
85
+ handleReview: T,
86
+ handleDelete: R,
87
+ employees: L,
76
88
  currentPage: p,
77
- totalPages: E,
78
- handleFirstPage: L,
79
- handlePreviousPage: _,
80
- handleNextPage: M,
81
- handleLastPage: S,
82
- handleCancelSelfOnboarding: R,
83
- handleItemsPerPageChange: f,
89
+ totalPages: c,
90
+ handleFirstPage: M,
91
+ handlePreviousPage: S,
92
+ handleNextPage: w,
93
+ handleLastPage: b,
94
+ handleCancelSelfOnboarding: x,
95
+ handleItemsPerPageChange: _,
84
96
  handleSkip: () => {
85
97
  a(s.EMPLOYEE_ONBOARDING_DONE);
86
- }
98
+ },
99
+ isFetching: O
87
100
  },
88
- children: c || /* @__PURE__ */ B(q, { flexDirection: "column", children: [
89
- /* @__PURE__ */ o(H, {}),
90
- /* @__PURE__ */ o(V, {}),
91
- /* @__PURE__ */ o(F, {})
101
+ children: l || /* @__PURE__ */ C(H, { flexDirection: "column", children: [
102
+ /* @__PURE__ */ o(K, {}),
103
+ /* @__PURE__ */ o(Q, {}),
104
+ /* @__PURE__ */ o(k, {})
92
105
  ] })
93
106
  }
94
107
  ) });
95
108
  }
96
- const ye = () => {
97
- const { companyId: n, onEvent: m } = z();
98
- return /* @__PURE__ */ o(J, { companyId: n, onEvent: m });
109
+ const De = () => {
110
+ const { companyId: n, onEvent: m } = X();
111
+ return /* @__PURE__ */ o(Z, { companyId: n, onEvent: m });
99
112
  };
100
113
  export {
101
- J as EmployeeList,
102
- ye as EmployeeListContextual
114
+ Z as EmployeeList,
115
+ De as EmployeeListContextual
103
116
  };
104
117
  //# sourceMappingURL=EmployeeList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const { data } = useEmployeesListSuspense({ companyId, page: currentPage, per: itemsPerPage })\n const { httpMeta, showEmployees: employeeList } = data\n const employees = employeeList!\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\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 const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","useEmployeesListSuspense","httpMeta","employeeList","employees","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":";;;;;;;;;;;;;;;;AA0BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAE/E,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAE1D,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C,EAAE,MAAAG,MAASC,EAAyB,EAAE,WAAAf,GAAW,MAAMS,GAAa,KAAKG,GAAc,GACvF,EAAE,UAAAI,GAAU,eAAeC,EAAA,IAAiBH,GAC5CI,IAAYD,GAEZ,EAAE,aAAaE,EAAA,IAA2BC,EAAA,GAC1C,EAAE,aAAaC,EAAA,IACnBC,EAAA,GAEIC,IAAa,OAAOP,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC,GAEvEQ,IAA2B,CAACC,MAAqB;AACrD,IAAAZ,EAAgBY,CAAQ;AAAA,EAC1B,GACMC,IAAkB,MAAM;AAC5B,IAAAhB,EAAe,CAAC;AAAA,EAClB,GACMiB,IAAqB,MAAM;AAC/B,IAAAjB,EAAe,OAAY,KAAK,IAAIkB,IAAW,GAAG,CAAC,CAAC;AAAA,EACtD,GACMC,IAAiB,MAAM;AAC3B,IAAAnB,EA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AAO;AAAA,QACL,YAPW,CAACV,GAAcW,MAAwC;AACxE,UAAArC,EAAQ4B,EAAgB,iBAAiB,EAAE,YAAYF,GAAM,kBAAAW,GAAkB;AAAA,QACjF;AAAA,QAMQ,WAfU,MAAM;AACtB,UAAArC,EAAQ4B,EAAgB,eAAe;AAAA,QACzC;AAAA,QAcQ,cAAAC;AAAA,QACA,cAAAJ;AAAA,QACA,WAAAb;AAAA,QACA,aAAAT;AAAA,QACA,YAAAc;AAAA,QACA,iBAAAG;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAE;AAAA,QACA,gBAAAC;AAAA,QACA,4BAAAS;AAAA,QACA,0BAAAf;AAAA,QACA,YAxBW,MAAM;AACvB,UAAAlB,EAAQ4B,EAAgB,wBAAwB;AAAA,QAClD;AAAA,MAsBQ;AAAA,MAGD,UAAAhC,KAGC,gBAAA0C,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAhD,EAACiD,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAKO,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAAjD,GAAW,SAAAM,EAAA,IAAY4C,EAAA;AAC/B,SAAO,gBAAArD,EAACF,GAAA,EAAa,WAAAK,GAAsB,SAAAM,EAAA,CAAkB;AAC/D;"}
1
+ {"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport { keepPreviousData } from '@tanstack/react-query'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex, Loading } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const { data, fetchStatus, isFetching } = useEmployeesList(\n {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n },\n { placeholderData: keepPreviousData },\n )\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n if (fetchStatus === 'fetching' && !data) {\n return <Loading />\n }\n const { httpMeta, showEmployees: employeeList } = data!\n const employees = employeeList!\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 const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n isFetching,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":";;;;;;;;;;;;;;;;;;AA2BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAE/E,EAAAC,EAAQ,uBAAuB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AA,QACA,oBAAAC;AAAA,QACA,gBAAAE;AAAA,QACA,gBAAAC;AAAA,QACA,4BAAAS;AAAA,QACA,0BAAAf;AAAA,QACA,YAxBW,MAAM;AACvB,UAAAtB,EAAQgC,EAAgB,wBAAwB;AAAA,QAClD;AAAA,QAuBQ,YAAAtB;AAAA,MAAA;AAAA,MAGD,UAAAd,KAGC,gBAAA8C,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAApD,EAACqD,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAKO,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAArD,GAAW,SAAAM,EAAA,IAAYgD,EAAA;AAC/B,SAAO,gBAAAzD,EAACF,GAAA,EAAa,WAAAK,GAAsB,SAAAM,EAAA,CAAkB;AAC/D;"}
@@ -1,21 +1,21 @@
1
- import { jsx as e, jsxs as c, Fragment as v } from "react/jsx-runtime";
2
- import { useTranslation as A } from "react-i18next";
3
- import { useState as T } from "react";
4
- import k from "./List.module.scss.js";
5
- import { useEmployeeList as w } from "./useEmployeeList.js";
1
+ import { jsx as e, jsxs as c, Fragment as A } from "react/jsx-runtime";
2
+ import { useTranslation as T } from "react-i18next";
3
+ import { useState as k } from "react";
4
+ import w from "./List.module.scss.js";
5
+ import { useEmployeeList as B } from "./useEmployeeList.js";
6
6
  import "classnames";
7
- import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as B } from "../../../shared/constants.js";
8
- import { EmptyData as M } from "../../Common/EmptyData/EmptyData.js";
7
+ import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as M } from "../../../shared/constants.js";
8
+ import { EmptyData as y } from "../../Common/EmptyData/EmptyData.js";
9
9
  import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
10
- import { useComponentContext as y } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import { HamburgerMenu as G } from "../../Common/HamburgerMenu/HamburgerMenu.js";
12
- import { EmployeeOnboardingStatusBadge as R } from "../../Common/OnboardingStatusBadge/index.js";
10
+ import { useComponentContext as G } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ import { HamburgerMenu as R } from "../../Common/HamburgerMenu/HamburgerMenu.js";
12
+ import { EmployeeOnboardingStatusBadge as F } from "../../Common/OnboardingStatusBadge/index.js";
13
13
  import s from "../../../assets/icons/pencil.svg.js";
14
14
  import x from "../../../assets/icons/trashcan.svg.js";
15
- import { firstLastName as F } from "../../../helpers/formattedStrings.js";
16
- import { useDataView as V } from "../../Common/DataView/useDataView.js";
17
- import { DataView as j } from "../../Common/DataView/DataView.js";
18
- const rt = () => {
15
+ import { firstLastName as V } from "../../../helpers/formattedStrings.js";
16
+ import { useDataView as j } from "../../Common/DataView/useDataView.js";
17
+ import { DataView as W } from "../../Common/DataView/DataView.js";
18
+ const ot = () => {
19
19
  const {
20
20
  handleDelete: g,
21
21
  employees: d,
@@ -30,14 +30,15 @@ const rt = () => {
30
30
  handleItemsPerPageChange: L,
31
31
  currentPage: O,
32
32
  totalPages: _,
33
- handleSkip: D
34
- } = w(), r = y(), { t: a } = A("Employee.EmployeeList"), [I, u] = T(/* @__PURE__ */ new Set()), { ...P } = V({
33
+ handleSkip: D,
34
+ isFetching: I
35
+ } = B(), r = G(), { t: a } = T("Employee.EmployeeList"), [P, u] = k(/* @__PURE__ */ new Set()), { ...v } = j({
35
36
  data: d,
36
37
  columns: [
37
38
  {
38
39
  key: "name",
39
40
  title: a("nameLabel"),
40
- render: (t) => F({
41
+ render: (t) => V({
41
42
  first_name: t.firstName,
42
43
  last_name: t.lastName
43
44
  })
@@ -46,7 +47,7 @@ const rt = () => {
46
47
  key: "status",
47
48
  title: a("statusLabel"),
48
49
  render: ({ onboarded: t, onboardingStatus: n }) => /* @__PURE__ */ e(
49
- R,
50
+ F,
50
51
  {
51
52
  onboarded: t,
52
53
  onboardingStatus: n
@@ -62,7 +63,7 @@ const rt = () => {
62
63
  p(t.uuid, t.onboardingStatus ?? void 0);
63
64
  },
64
65
  icon: /* @__PURE__ */ e(s, { "aria-hidden": !0 })
65
- }), B.has(t.onboarding_status ?? "") && n.push({
66
+ }), M.has(t.onboarding_status ?? "") && n.push({
66
67
  label: a("cancelSelfOnboardingCta"),
67
68
  onClick: async () => {
68
69
  await b(t.uuid);
@@ -86,14 +87,15 @@ const rt = () => {
86
87
  },
87
88
  icon: /* @__PURE__ */ e(x, { "aria-hidden": !0 })
88
89
  }), /* @__PURE__ */ e(
89
- G,
90
+ R,
90
91
  {
91
92
  items: n,
92
93
  triggerLabel: a("hamburgerTitle"),
93
- isLoading: I.has(t.uuid)
94
+ isLoading: P.has(t.uuid)
94
95
  }
95
96
  );
96
97
  },
98
+ isFetching: I,
97
99
  pagination: {
98
100
  handleNextPage: C,
99
101
  handleFirstPage: E,
@@ -103,17 +105,17 @@ const rt = () => {
103
105
  currentPage: O,
104
106
  totalPages: _
105
107
  },
106
- emptyState: () => /* @__PURE__ */ e(M, { title: a("emptyTableTitle"), description: a("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
108
+ emptyState: () => /* @__PURE__ */ e(y, { title: a("emptyTableTitle"), description: a("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
107
109
  /* @__PURE__ */ e(r.Button, { variant: "secondary", onClick: D, children: a("skipCta") }),
108
110
  /* @__PURE__ */ e(r.Button, { variant: "primary", onClick: l, children: a("addEmployeeCTA") })
109
111
  ] }) })
110
112
  });
111
- return /* @__PURE__ */ c(v, { children: [
113
+ return /* @__PURE__ */ c(A, { children: [
112
114
  d.length > 0 && /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(r.Button, { variant: "secondary", onClick: l, children: a("addAnotherCta") }) }),
113
- /* @__PURE__ */ e("div", { className: k.container, children: /* @__PURE__ */ e(j, { label: a("employeeListLabel"), ...P }) })
115
+ /* @__PURE__ */ e("div", { className: w.container, children: /* @__PURE__ */ e(W, { label: a("employeeListLabel"), ...v }) })
114
116
  ] });
115
117
  };
116
118
  export {
117
- rt as List
119
+ ot as List
118
120
  };
119
121
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/EmployeeList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useState } from 'react'\nimport style from './List.module.scss'\nimport { useEmployeeList } from './useEmployeeList'\nimport { DataView, EmptyData, ActionsLayout, useDataView } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { EmployeeOnboardingStatusBadge } from '@/components/Common/OnboardingStatusBadge'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { EmployeeOnboardingStatus, EmployeeSelfOnboardingStatuses } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const {\n handleDelete,\n employees,\n handleEdit,\n handleReview,\n handleNew,\n handleCancelSelfOnboarding,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n handleSkip,\n } = useEmployeeList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Employee.EmployeeList')\n const [deleting, setDeleting] = useState<Set<string>>(new Set())\n const { ...dataViewProps } = useDataView({\n data: employees,\n columns: [\n {\n key: 'name',\n title: t('nameLabel'),\n render: employee => {\n return firstLastName({\n first_name: employee.firstName,\n last_name: employee.lastName,\n })\n },\n },\n {\n key: 'status',\n title: t('statusLabel'),\n render: ({ onboarded, onboardingStatus }) => (\n <EmployeeOnboardingStatusBadge\n onboarded={onboarded}\n onboardingStatus={onboardingStatus}\n />\n ),\n },\n ],\n itemMenu: employee => {\n const menuItems = []\n\n // Edit item\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE ||\n employee.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW ||\n employee.onboardingStatus === EmployeeOnboardingStatus.ONBOARDING_COMPLETED\n ) {\n menuItems.push({\n label: t('editCta'),\n onClick: () => {\n handleEdit(employee.uuid, employee.onboardingStatus ?? undefined)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Cancel self onboarding item\n /* @ts-expect-error: onboarding_status during runtime can be one of self onboarding statuses */\n if (EmployeeSelfOnboardingStatuses.has(employee.onboarding_status ?? '')) {\n menuItems.push({\n label: t('cancelSelfOnboardingCta'),\n onClick: async () => {\n await handleCancelSelfOnboarding(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Review item\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE\n ) {\n menuItems.push({\n label: t('reviewCta'),\n onClick: () => {\n void handleReview(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Delete item\n if (!employee.onboarded) {\n menuItems.push({\n label: t('deleteCta'),\n onClick: () => {\n setDeleting(prev => new Set(prev).add(employee.uuid))\n void handleDelete(employee.uuid).then(() => {\n setDeleting(prev => {\n const newSet = new Set(prev)\n newSet.delete(employee.uuid)\n return newSet\n })\n })\n },\n icon: <TrashCanSvg aria-hidden />,\n })\n }\n\n return (\n <HamburgerMenu\n items={menuItems}\n triggerLabel={t('hamburgerTitle')}\n isLoading={deleting.has(employee.uuid)}\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 <ActionsLayout justifyContent=\"center\">\n <Components.Button variant=\"secondary\" onClick={handleSkip}>\n {t('skipCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" onClick={handleNew}>\n {t('addEmployeeCTA')}\n </Components.Button>\n </ActionsLayout>\n </EmptyData>\n ),\n })\n return (\n <>\n {employees.length > 0 && (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleNew}>\n {t('addAnotherCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n <div className={style.container}>\n <DataView label={t('employeeListLabel')} {...dataViewProps} />\n </div>\n </>\n )\n}\n"],"names":["List","handleDelete","employees","handleEdit","handleReview","handleNew","handleCancelSelfOnboarding","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","currentPage","totalPages","handleSkip","useEmployeeList","Components","useComponentContext","t","useTranslation","deleting","setDeleting","useState","dataViewProps","useDataView","employee","firstLastName","onboarded","onboardingStatus","jsx","EmployeeOnboardingStatusBadge","menuItems","EmployeeOnboardingStatus","PencilSvg","EmployeeSelfOnboardingStatuses","prev","newSet","TrashCanSvg","HamburgerMenu","EmptyData","jsxs","ActionsLayout","Fragment","style","DataView"],"mappings":";;;;;;;;;;;;;;;;;AAcO,MAAMA,KAAO,MAAM;AACxB,QAAM;AAAA,IACJ,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,IACEC,EAAA,GACEC,IAAaC,EAAA,GAEb,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,CAACC,GAAUC,CAAW,IAAIC,EAAsB,oBAAI,KAAK,GACzD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AAX,EAAkB,SAAQ,WAAU,SAASX,GAC3C,UAAAa,EAAE,gBAAgB,EAAA,CACrB;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,CAEH;AACD,SACE,gBAAAsB,EAAAE,GAAA,EACG,UAAA;AAAA,IAAAxC,EAAU,SAAS,KAClB,gBAAA2B,EAACY,GAAA,EACC,4BAACzB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASX,GAC7C,UAAAa,EAAE,eAAe,GACpB,GACF;AAAA,IAEF,gBAAAW,EAAC,OAAA,EAAI,WAAWc,EAAM,WACpB,UAAA,gBAAAd,EAACe,GAAA,EAAS,OAAO1B,EAAE,mBAAmB,GAAI,GAAGK,GAAe,EAAA,CAC9D;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/EmployeeList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useState } from 'react'\nimport style from './List.module.scss'\nimport { useEmployeeList } from './useEmployeeList'\nimport { DataView, EmptyData, ActionsLayout, useDataView } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { EmployeeOnboardingStatusBadge } from '@/components/Common/OnboardingStatusBadge'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { EmployeeOnboardingStatus, EmployeeSelfOnboardingStatuses } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const {\n handleDelete,\n employees,\n handleEdit,\n handleReview,\n handleNew,\n handleCancelSelfOnboarding,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n handleSkip,\n isFetching,\n } = useEmployeeList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Employee.EmployeeList')\n const [deleting, setDeleting] = useState<Set<string>>(new Set())\n const { ...dataViewProps } = useDataView({\n data: employees,\n columns: [\n {\n key: 'name',\n title: t('nameLabel'),\n render: employee => {\n return firstLastName({\n first_name: employee.firstName,\n last_name: employee.lastName,\n })\n },\n },\n {\n key: 'status',\n title: t('statusLabel'),\n render: ({ onboarded, onboardingStatus }) => (\n <EmployeeOnboardingStatusBadge\n onboarded={onboarded}\n onboardingStatus={onboardingStatus}\n />\n ),\n },\n ],\n itemMenu: employee => {\n const menuItems = []\n\n // Edit item\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE ||\n employee.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW ||\n employee.onboardingStatus === EmployeeOnboardingStatus.ONBOARDING_COMPLETED\n ) {\n menuItems.push({\n label: t('editCta'),\n onClick: () => {\n handleEdit(employee.uuid, employee.onboardingStatus ?? undefined)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Cancel self onboarding item\n /* @ts-expect-error: onboarding_status during runtime can be one of self onboarding statuses */\n if (EmployeeSelfOnboardingStatuses.has(employee.onboarding_status ?? '')) {\n menuItems.push({\n label: t('cancelSelfOnboardingCta'),\n onClick: async () => {\n await handleCancelSelfOnboarding(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Review item\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE\n ) {\n menuItems.push({\n label: t('reviewCta'),\n onClick: () => {\n void handleReview(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Delete item\n if (!employee.onboarded) {\n menuItems.push({\n label: t('deleteCta'),\n onClick: () => {\n setDeleting(prev => new Set(prev).add(employee.uuid))\n void handleDelete(employee.uuid).then(() => {\n setDeleting(prev => {\n const newSet = new Set(prev)\n newSet.delete(employee.uuid)\n return newSet\n })\n })\n },\n icon: <TrashCanSvg aria-hidden />,\n })\n }\n\n return (\n <HamburgerMenu\n items={menuItems}\n triggerLabel={t('hamburgerTitle')}\n isLoading={deleting.has(employee.uuid)}\n />\n )\n },\n isFetching,\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 <ActionsLayout justifyContent=\"center\">\n <Components.Button variant=\"secondary\" onClick={handleSkip}>\n {t('skipCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" onClick={handleNew}>\n {t('addEmployeeCTA')}\n </Components.Button>\n </ActionsLayout>\n </EmptyData>\n ),\n })\n return (\n <>\n {employees.length > 0 && (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleNew}>\n {t('addAnotherCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n <div className={style.container}>\n <DataView label={t('employeeListLabel')} {...dataViewProps} />\n </div>\n </>\n )\n}\n"],"names":["List","handleDelete","employees","handleEdit","handleReview","handleNew","handleCancelSelfOnboarding","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","currentPage","totalPages","handleSkip","isFetching","useEmployeeList","Components","useComponentContext","t","useTranslation","deleting","setDeleting","useState","dataViewProps","useDataView","employee","firstLastName","onboarded","onboardingStatus","jsx","EmployeeOnboardingStatusBadge","menuItems","EmployeeOnboardingStatus","PencilSvg","EmployeeSelfOnboardingStatuses","prev","newSet","TrashCanSvg","HamburgerMenu","EmptyData","jsxs","ActionsLayout","Fragment","style","DataView"],"mappings":";;;;;;;;;;;;;;;;;AAcO,MAAMA,KAAO,MAAM;AACxB,QAAM;AAAA,IACJ,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;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AAAG;AAAA,MACA,aAAAC;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAiB,EAACU,GAAA,EAAU,OAAOrB,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAsB,EAACC,GAAA,EAAc,gBAAe,UAC5B,UAAA;AAAA,MAAA,gBAAAZ,EAACb,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAK,EAAE,SAAS,EAAA,CACd;AAAA,MACA,gBAAAW,EAACb,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASZ,GAC3C,UAAAc,EAAE,gBAAgB,EAAA,CACrB;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,CAEH;AACD,SACE,gBAAAsB,EAAAE,GAAA,EACG,UAAA;AAAA,IAAAzC,EAAU,SAAS,KAClB,gBAAA4B,EAACY,GAAA,EACC,4BAACzB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASZ,GAC7C,UAAAc,EAAE,eAAe,GACpB,GACF;AAAA,IAEF,gBAAAW,EAAC,OAAA,EAAI,WAAWc,EAAM,WACpB,UAAA,gBAAAd,EAACe,GAAA,EAAS,OAAO1B,EAAE,mBAAmB,GAAI,GAAGK,GAAe,EAAA,CAC9D;AAAA,EAAA,GACF;AAEJ;"}
@@ -15,6 +15,7 @@ type EmployeeListContextType = {
15
15
  currentPage: number;
16
16
  totalPages: number;
17
17
  employees: Employee[];
18
+ isFetching: boolean;
18
19
  };
19
20
  declare const useEmployeeList: () => EmployeeListContextType, EmployeeListProvider: import('react').Provider<EmployeeListContextType | null>;
20
21
  export { useEmployeeList, EmployeeListProvider };
@@ -2,15 +2,21 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
+ import "@gusto/embedded-api/models/errors/apierror";
6
+ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
+ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
5
9
  import "../../Base/useBase.js";
6
10
  import "../../../shared/constants.js";
7
11
  import "classnames";
8
12
  import "dompurify";
13
+ import "../../../contexts/LocaleProvider/useLocale.js";
9
14
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
10
16
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
11
- const [y, C] = o("EmployeeListContext");
17
+ const [u, a] = o("EmployeeListContext");
12
18
  export {
13
- C as EmployeeListProvider,
14
- y as useEmployeeList
19
+ a as EmployeeListProvider,
20
+ u as useEmployeeList
15
21
  };
16
22
  //# sourceMappingURL=useEmployeeList.js.map