@gusto/embedded-react-sdk 0.10.3-rc.1 → 0.10.3-rc.2

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 (204) hide show
  1. package/dist/components/Base/Base.js +2 -3
  2. package/dist/components/Base/Base.js.map +1 -1
  3. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
  4. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  5. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
  6. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  7. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
  8. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  9. package/dist/components/Company/AssignSignatory/AssignSignatory.js +11 -13
  10. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  11. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  12. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +0 -1
  16. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
  18. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  20. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  22. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +3 -4
  24. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  28. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  30. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  31. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  32. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  33. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
  34. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  35. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -8
  36. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  37. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  38. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  39. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  40. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  42. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  43. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
  44. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  45. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  46. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  47. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +15 -17
  48. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  49. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  50. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  51. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -9
  52. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  53. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  54. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  55. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  56. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  57. package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -17
  58. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  59. package/dist/components/Company/FederalTaxes/Form.js +2 -3
  60. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  61. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
  62. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  63. package/dist/components/Company/Industry/Actions.js +5 -6
  64. package/dist/components/Company/Industry/Actions.js.map +1 -1
  65. package/dist/components/Company/Industry/Context.js +6 -7
  66. package/dist/components/Company/Industry/Context.js.map +1 -1
  67. package/dist/components/Company/Industry/Edit.js +10 -11
  68. package/dist/components/Company/Industry/Edit.js.map +1 -1
  69. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  70. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  71. package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
  72. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  73. package/dist/components/Company/Locations/LocationForm/LocationForm.js +7 -9
  74. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  75. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  76. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  77. package/dist/components/Company/Locations/Locations.d.ts +1 -1
  78. package/dist/components/Company/Locations/Locations.js +19 -17
  79. package/dist/components/Company/Locations/Locations.js.map +1 -1
  80. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  81. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  82. package/dist/components/Company/Locations/LocationsList/List.js +6 -7
  83. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  84. package/dist/components/Company/Locations/LocationsList/LocationsList.js +9 -11
  85. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  86. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  87. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  88. package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
  89. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  90. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +2 -3
  91. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  92. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -4
  93. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  94. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  95. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  96. package/dist/components/Company/PaySchedule/PaySchedule.js +0 -2
  97. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  98. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -11
  99. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  100. package/dist/components/Company/PaySchedule/_parts/Edit.js +8 -9
  101. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  102. package/dist/components/Company/PaySchedule/_parts/Head.js +2 -3
  103. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  104. package/dist/components/Company/PaySchedule/_parts/List.js +5 -6
  105. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  106. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  107. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  108. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  109. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  110. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  111. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  112. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  113. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  114. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  115. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  116. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  117. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  118. package/dist/components/Contractor/Address/Address.js +0 -2
  119. package/dist/components/Contractor/Address/Address.js.map +1 -1
  120. package/dist/components/Contractor/Address/Form.js +2 -3
  121. package/dist/components/Contractor/Address/Form.js.map +1 -1
  122. package/dist/components/Contractor/Address/useAddress.js +5 -6
  123. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  124. package/dist/components/Contractor/List/index.js +2 -3
  125. package/dist/components/Contractor/List/index.js.map +1 -1
  126. package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
  127. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  128. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
  129. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  130. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  131. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  132. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  133. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  134. package/dist/components/Employee/Compensation/Actions.js +4 -5
  135. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  136. package/dist/components/Employee/Compensation/Edit.js +2 -3
  137. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  138. package/dist/components/Employee/Compensation/List.js +5 -6
  139. package/dist/components/Employee/Compensation/List.js.map +1 -1
  140. package/dist/components/Employee/Deductions/Actions.js +8 -9
  141. package/dist/components/Employee/Deductions/Actions.js.map +1 -1
  142. package/dist/components/Employee/Deductions/DeductionForm.js +2 -3
  143. package/dist/components/Employee/Deductions/DeductionForm.js.map +1 -1
  144. package/dist/components/Employee/Deductions/DeductionsList.js +2 -3
  145. package/dist/components/Employee/Deductions/DeductionsList.js.map +1 -1
  146. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +2 -3
  147. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +1 -1
  148. package/dist/components/Employee/Deductions/useDeductions.js +5 -6
  149. package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
  150. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
  151. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  152. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -12
  153. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  154. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
  155. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  156. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  157. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  158. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +8 -10
  159. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  160. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  161. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  162. package/dist/components/Employee/EmployeeList/Actions.js +4 -5
  163. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  164. package/dist/components/Employee/EmployeeList/EmployeeList.js +2 -4
  165. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  166. package/dist/components/Employee/EmployeeList/Head.js +2 -3
  167. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  168. package/dist/components/Employee/EmployeeList/List.js +2 -3
  169. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  170. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  171. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  172. package/dist/components/Employee/Landing/Landing.js +6 -7
  173. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  174. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  175. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  176. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -3
  177. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  178. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  179. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  180. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
  181. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  182. package/dist/components/Employee/PaymentMethod/Split.js +2 -3
  183. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  184. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  185. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  186. package/dist/components/Employee/Profile/Actions.js +6 -7
  187. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  188. package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
  189. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  190. package/dist/components/Employee/Profile/HomeAddress.js +4 -5
  191. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  192. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
  193. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  194. package/dist/components/Employee/Profile/useProfile.js +3 -4
  195. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  196. package/dist/components/Employee/Taxes/Actions.js +7 -8
  197. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  198. package/dist/components/Employee/Taxes/FederalForm.js +4 -5
  199. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  200. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  201. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  202. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  203. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  204. package/package.json +1 -1
@@ -8,13 +8,12 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
8
  import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
- import "classnames";
12
11
  import "dompurify";
13
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = o("SignatureFormContext");
14
+ const [S, c] = o("SignatureFormContext");
16
15
  export {
17
- d as SignatureFormProvider,
18
- c as useSignatureForm
16
+ c as SignatureFormProvider,
17
+ S as useSignatureForm
19
18
  };
20
19
  //# 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,14 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
3
  import { useEmployeeList as m } from "./useEmployeeList.js";
4
- import "classnames";
5
4
  import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
6
- import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function C() {
8
- const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = p();
5
+ import { useComponentContext as l } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ function y() {
7
+ const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = l();
9
8
  return e.length === 0 ? null : /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { onClick: n, isLoading: !1, children: t("continueCta") }) });
10
9
  }
11
10
  export {
12
- C as Actions
11
+ y as Actions
13
12
  };
14
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,YAAAC,GAAY,WAAAC,EAAU,IAAIC,EAAgB,GAC5CC,IAAaC,EAAoB;AAEnC,SAAAH,EAAU,WAAW,IAChB,OAIN,gBAAAI,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,YAAAC,GAAY,WAAAC,EAAU,IAAIC,EAAgB,GAC5CC,IAAaC,EAAoB;AAEnC,SAAAH,EAAU,WAAW,IAChB,OAIN,gBAAAI,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
@@ -8,8 +8,6 @@ import { Actions as P } from "./Actions.js";
8
8
  import { BaseComponent as H } from "../../Base/Base.js";
9
9
  import { useBase as j } from "../../Base/useBase.js";
10
10
  import { Flex as k } from "../../Common/Flex/Flex.js";
11
- import "react-i18next";
12
- import "classnames";
13
11
  import { useI18n as V, useComponentDictionary as z } from "../../../i18n/I18n.js";
14
12
  import { componentEvents as s, EmployeeOnboardingStatus as l } from "../../../shared/constants.js";
15
13
  import { Head as h } from "./Head.js";
@@ -97,12 +95,12 @@ function K({ companyId: n, className: E, children: p, dictionary: g }) {
97
95
  m.Head = h;
98
96
  m.List = O;
99
97
  m.Actions = P;
100
- const Pe = () => {
98
+ const ue = () => {
101
99
  const { companyId: n, onEvent: E } = J();
102
100
  return /* @__PURE__ */ o(m, { companyId: n, onEvent: E });
103
101
  };
104
102
  export {
105
103
  m as EmployeeList,
106
- Pe as EmployeeListContextual
104
+ ue as EmployeeListContextual
107
105
  };
108
106
  //# 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/OnboardingFlow'\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, employees: 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\nEmployeeList.Head = Head\nEmployeeList.List = List\nEmployeeList.Actions = Actions\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;AAE5E,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;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,EAAkB,IAAIC,EAAQ,GACzC,CAAC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D,EAACiD,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAEArD,EAAa,OAAOmD;AACpBnD,EAAa,OAAOoD;AACpBpD,EAAa,UAAUqD;AAKhB,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAAjD,GAAW,SAAAM,EAAQ,IAAI4C,EAAoC;AAC5D,SAAA,gBAAArD,EAACF,GAAa,EAAA,WAAAK,GAAsB,SAAAM,EAAkB,CAAA;AAC/D;"}
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/OnboardingFlow'\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, employees: 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\nEmployeeList.Head = Head\nEmployeeList.List = List\nEmployeeList.Actions = Actions\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;AAE5E,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;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,EAAkB,IAAIC,EAAQ,GACzC,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,WAAWC,EAAiB,IAAAH,GACxCI,IAAYD,GAEZ,EAAE,aAAaE,EAAuB,IAAIC,EAA2B,GACrE,EAAE,aAAaC,EAAuC,IAC1DC,EAA2C,GAEvCC,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;AA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ACzE;AAAA,EACH;AAYE,SAAA,gBAAA5C,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAAC6C;AAAA,IAAA;AAAA,MACC,OAAO;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,MAuBM;AAAA,MAEC,UACChC,KAEC,gBAAA0C,EAAAC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAhD,EAACiD,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAEArD,EAAa,OAAOmD;AACpBnD,EAAa,OAAOoD;AACpBpD,EAAa,UAAUqD;AAKhB,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAAjD,GAAW,SAAAM,EAAQ,IAAI4C,EAAoC;AAC5D,SAAA,gBAAArD,EAACF,GAAa,EAAA,WAAAK,GAAsB,SAAAM,EAAkB,CAAA;AAC/D;"}
@@ -1,13 +1,12 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { useTranslation as n } from "react-i18next";
3
3
  import { Flex as r } from "../../Common/Flex/Flex.js";
4
- import "classnames";
5
4
  import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
- const c = () => {
5
+ const a = () => {
7
6
  const { t } = n("Employee.EmployeeList"), o = m();
8
7
  return /* @__PURE__ */ e(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ e(o.Heading, { as: "h2", children: t("title") }) });
9
8
  };
10
9
  export {
11
- c as Head
10
+ a as Head
12
11
  };
13
12
  //# sourceMappingURL=Head.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":";;;;;AAKO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA,gBAAAD,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAE,EAAA,OAAO,EAAE,CAAA,GAC1C;AAEJ;"}
1
+ {"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":";;;;AAKO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA,gBAAAD,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAE,EAAA,OAAO,EAAE,CAAA,GAC1C;AAEJ;"}
@@ -3,7 +3,6 @@ import { useTranslation as A } from "react-i18next";
3
3
  import { useState as T } from "react";
4
4
  import k from "./List.module.scss.js";
5
5
  import { useEmployeeList as w } from "./useEmployeeList.js";
6
- import "classnames";
7
6
  import { EmptyData as B } from "../../Common/EmptyData/EmptyData.js";
8
7
  import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
9
8
  import { useComponentContext as M } from "../../../contexts/ComponentAdapter/useComponentContext.js";
@@ -15,7 +14,7 @@ import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as x } fr
15
14
  import { firstLastName as F } from "../../../helpers/formattedStrings.js";
16
15
  import { useDataView as V } from "../../Common/DataView/useDataView.js";
17
16
  import { DataView as j } from "../../Common/DataView/DataView.js";
18
- const rt = () => {
17
+ const it = () => {
19
18
  const {
20
19
  handleDelete: g,
21
20
  employees: d,
@@ -114,6 +113,6 @@ const rt = () => {
114
113
  ] });
115
114
  };
116
115
  export {
117
- rt as List
116
+ it as List
118
117
  };
119
118
  //# 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;AAClB,QAAA;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,MACEC,EAAgB,GACdC,IAAaC,EAAoB,GAEjC,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,CAACC,GAAUC,CAAW,IAAIC,EAAsB,oBAAI,KAAK,GACzD,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMtB;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOgB,EAAE,WAAW;AAAA,QACpB,QAAQ,CAAYO,MACXC,EAAc;AAAA,UACnB,YAAYD,EAAS;AAAA,UACrB,WAAWA,EAAS;AAAA,QAAA,CACrB;AAAA,MAEL;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAOP,EAAE,aAAa;AAAA,QACtB,QAAQ,CAAC,EAAE,WAAAS,GAAW,kBAAAC,EACpB,MAAA,gBAAAC;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,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B,EAAE,mBAAmB,GAAI,GAAGK,GAAe,EAC9D,CAAA;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 } = 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;AAClB,QAAA;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,MACEC,EAAgB,GACdC,IAAaC,EAAoB,GAEjC,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,CAACC,GAAUC,CAAW,IAAIC,EAAsB,oBAAI,KAAK,GACzD,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMtB;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO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AA,CAEH;AACD,SAEK,gBAAAsB,EAAAE,GAAA,EAAA,UAAA;AAAA,IAAAxC,EAAU,SAAS,KACjB,gBAAA2B,EAAAY,GAAA,EACC,4BAACzB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASX,GAC7C,UAAEa,EAAA,eAAe,EACpB,CAAA,GACF;AAAA,IAED,gBAAAW,EAAA,OAAA,EAAI,WAAWc,EAAM,WACpB,UAAA,gBAAAd,EAACe,GAAS,EAAA,OAAO1B,EAAE,mBAAmB,GAAI,GAAGK,GAAe,EAC9D,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -8,13 +8,12 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
8
  import "@tanstack/react-query";
9
9
  import "../../Base/useBase.js";
10
10
  import "../../../shared/constants.js";
11
- import "classnames";
12
11
  import "dompurify";
13
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
13
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [c, d] = o("EmployeeListContext");
14
+ const [L, c] = o("EmployeeListContext");
16
15
  export {
17
- d as EmployeeListProvider,
18
- c as useEmployeeList
16
+ c as EmployeeListProvider,
17
+ L as useEmployeeList
19
18
  };
20
19
  //# sourceMappingURL=useEmployeeList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAsBA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -6,21 +6,20 @@ import s from "./Landing.module.scss.js";
6
6
  import { BaseComponent as x } from "../../Base/Base.js";
7
7
  import { useBase as y } from "../../Base/useBase.js";
8
8
  import { Flex as r } from "../../Common/Flex/Flex.js";
9
- import "classnames";
10
9
  import { ActionsLayout as E } from "../../Common/ActionsLayout/ActionsLayout.js";
11
10
  import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
11
  import { useI18n as D, useComponentDictionary as I } from "../../../i18n/I18n.js";
13
12
  import { componentEvents as S } from "../../../shared/constants.js";
14
- function H(t) {
13
+ function F(t) {
15
14
  return D("Employee.Landing"), I("Employee.Landing", t.dictionary), /* @__PURE__ */ e(x, { ...t, children: /* @__PURE__ */ e(L, { ...t, children: t.children }) });
16
15
  }
17
- const L = ({ employeeId: t, companyId: c, className: m }) => {
18
- const { onEvent: l } = y(), o = C(), {
16
+ const L = ({ employeeId: t, companyId: c, className: l }) => {
17
+ const { onEvent: m } = y(), o = C(), {
19
18
  data: { employee: a }
20
19
  } = h({ employeeId: t }), p = a.firstName, {
21
20
  data: { company: d }
22
21
  } = g({ companyId: c }), f = d?.name, { t: n } = u("Employee.Landing");
23
- return /* @__PURE__ */ e("section", { className: m, children: /* @__PURE__ */ i(r, { alignItems: "center", flexDirection: "column", gap: 32, children: [
22
+ return /* @__PURE__ */ e("section", { className: l, children: /* @__PURE__ */ i(r, { alignItems: "center", flexDirection: "column", gap: 32, children: [
24
23
  /* @__PURE__ */ i(r, { alignItems: "center", flexDirection: "column", gap: 8, children: [
25
24
  /* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: n("landingSubtitle", { firstName: p, companyName: f }) }),
26
25
  /* @__PURE__ */ e(o.Text, { className: s.description, children: n("landingDescription") })
@@ -39,7 +38,7 @@ const L = ({ employeeId: t, companyId: c, className: m }) => {
39
38
  {
40
39
  variant: "secondary",
41
40
  onClick: () => {
42
- l(S.EMPLOYEE_SELF_ONBOARDING_START);
41
+ m(S.EMPLOYEE_SELF_ONBOARDING_START);
43
42
  },
44
43
  children: n("getStartedCta")
45
44
  }
@@ -49,6 +48,6 @@ const L = ({ employeeId: t, companyId: c, className: m }) => {
49
48
  ] }) });
50
49
  };
51
50
  export {
52
- H as Landing
51
+ F as Landing
53
52
  };
54
53
  //# sourceMappingURL=Landing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport styles from './Landing.module.scss'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const firstName = employee!.firstName\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const companyName = company?.name\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('landingSubtitle', { firstName, companyName })}\n </Components.Heading>\n <Components.Text className={styles.description}>\n {t('landingDescription')}\n </Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <ul>\n <li>{t('steps.personalInfo')}</li>\n <li>{t('steps.taxInfo')}</li>\n <li>{t('steps.bankInfo')}</li>\n </ul>\n </Flex>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n </Components.Button>\n </ActionsLayout>\n <Components.Text className={styles.description}>\n {t('getStartedDescription')}\n </Components.Text>\n </Flex>\n </Flex>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","firstName","company","useCompaniesGetSuspense","companyName","t","useTranslation","jsxs","Flex","styles","ActionsLayout","componentEvents"],"mappings":";;;;;;;;;;;;;AAqBO,SAASA,EAAQC,GAA8C;AACpE,SAAAC,EAAQ,kBAAkB,GACHC,EAAA,oBAAoBF,EAAM,UAAU,GAGzD,gBAAAG,EAACC,GAAe,EAAA,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,WAAAC,QAA8B;AAC7D,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAQ,GACtBC,IAAaC,EAAoB,GAEjC;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAS;AAAA,EAAA,IACfC,EAAwB,EAAE,YAAAR,GAAY,GACpCS,IAAYF,EAAU,WAEtB;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAQ;AAAA,EAAA,IACdC,EAAwB,EAAE,WAAAV,GAAW,GACnCW,IAAcF,GAAS,MAEvB,EAAE,GAAAG,EAAA,IAAMC,EAAe,kBAAkB;AAG7C,SAAA,gBAAAjB,EAAC,WAAQ,EAAA,WAAAK,GACP,UAAC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O,aAChC,UAAEJ,EAAA,uBAAuB,EAC5B,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,EAAA,CACF,EACF,CAAA;AAEJ;"}
1
+ {"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport styles from './Landing.module.scss'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const firstName = employee!.firstName\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const companyName = company?.name\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('landingSubtitle', { firstName, companyName })}\n </Components.Heading>\n <Components.Text className={styles.description}>\n {t('landingDescription')}\n </Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <ul>\n <li>{t('steps.personalInfo')}</li>\n <li>{t('steps.taxInfo')}</li>\n <li>{t('steps.bankInfo')}</li>\n </ul>\n </Flex>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n </Components.Button>\n </ActionsLayout>\n <Components.Text className={styles.description}>\n {t('getStartedDescription')}\n </Components.Text>\n </Flex>\n </Flex>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","firstName","company","useCompaniesGetSuspense","companyName","t","useTranslation","jsxs","Flex","styles","ActionsLayout","componentEvents"],"mappings":";;;;;;;;;;;;AAqBO,SAASA,EAAQC,GAA8C;AACpE,SAAAC,EAAQ,kBAAkB,GACHC,EAAA,oBAAoBF,EAAM,UAAU,GAGzD,gBAAAG,EAACC,GAAe,EAAA,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,WAAAC,QAA8B;AAC7D,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAQ,GACtBC,IAAaC,EAAoB,GAEjC;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAS;AAAA,EAAA,IACfC,EAAwB,EAAE,YAAAR,GAAY,GACpCS,IAAYF,EAAU,WAEtB;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAQ;AAAA,EAAA,IACdC,EAAwB,EAAE,WAAAV,GAAW,GACnCW,IAAcF,GAAS,MAEvB,EAAE,GAAAG,EAAA,IAAMC,EAAe,k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,GAEtB;AAAA,MACA,gBAAAtB,EAACQ,EAAW,MAAX,EAAgB,WAAWY,EAAO,aAChC,UAAEJ,EAAA,uBAAuB,EAC5B,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,EAAA,CACF,EACF,CAAA;AAEJ;"}
@@ -1,11 +1,10 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { useTranslation as m } from "react-i18next";
3
- import { usePaymentMethod as l } from "./usePaymentMethod.js";
4
- import "classnames";
2
+ import { useTranslation as l } from "react-i18next";
3
+ import { usePaymentMethod as m } from "./usePaymentMethod.js";
5
4
  import { ActionsLayout as p } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const f = () => {
8
- const { handleAdd: a, handleCancel: i, isPending: r, bankAccounts: s, handleSplit: c, mode: t } = l(), { t: n } = m("Employee.PaymentMethod"), o = u();
6
+ const L = () => {
7
+ const { handleAdd: a, handleCancel: i, isPending: r, bankAccounts: s, handleSplit: c, mode: t } = m(), { t: n } = l("Employee.PaymentMethod"), o = u();
9
8
  return /* @__PURE__ */ d(p, { children: [
10
9
  (t === "ADD" || t === "SPLIT") && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: i, children: n("cancelAddCta") }),
11
10
  t === "LIST" && s.length > 1 && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: c, children: n("splitCta") }),
@@ -14,6 +13,6 @@ const f = () => {
14
13
  ] });
15
14
  };
16
15
  export {
17
- f as Actions
16
+ L as Actions
18
17
  };
19
18
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AACrB,QAAA,EAAE,WAAAC,GAAW,cAAAC,GAAc,WAAAC,GAAW,cAAAC,GAAc,aAAAC,GAAa,MAAAC,MAASC,EAAiB,GAC3F,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAaC,EAAoB;AAEvC,2BACGC,GACG,EAAA,UAAA;AAAA,KAAAN,MAAS,SAASA,MAAS,YAC3B,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASR,GAC3D,UAAAM,EAAE,cAAc,GACnB;AAAA,IAEDF,MAAS,UAAUF,EAAa,SAAS,uBACvCM,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASL,GAC3D,UAAAG,EAAE,UAAU,GACf;AAAA,IAEDF,MAAS,UACP,gBAAAO,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAAST,GAC3D,UAAAO,EAAE,eAAe,GACpB;AAAA,IAED,gBAAAK,EAAAH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAK,EAAEF,MAAS,SAASA,MAAS,UAAU,YAAY,WAAW,EACjE,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AACrB,QAAA,EAAE,WAAAC,GAAW,cAAAC,GAAc,WAAAC,GAAW,cAAAC,GAAc,aAAAC,GAAa,MAAAC,MAASC,EAAiB,GAC3F,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAaC,EAAoB;AAEvC,2BACGC,GACG,EAAA,UAAA;AAAA,KAAAN,MAAS,SAASA,MAAS,YAC3B,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASR,GAC3D,UAAAM,EAAE,cAAc,GACnB;AAAA,IAEDF,MAAS,UAAUF,EAAa,SAAS,uBACvCM,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASL,GAC3D,UAAAG,EAAE,UAAU,GACf;AAAA,IAEDF,MAAS,UACP,gBAAAO,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAAST,GAC3D,UAAAO,EAAE,eAAe,GACpB;AAAA,IAED,gBAAAK,EAAAH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAK,EAAEF,MAAS,SAASA,MAAS,UAAU,YAAY,WAAW,EACjE,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -2,11 +2,10 @@ import { jsxs as i, Fragment as u, jsx as r } from "react/jsx-runtime";
2
2
  import { useFormContext as m } from "react-hook-form";
3
3
  import { useTranslation as c } from "react-i18next";
4
4
  import { usePaymentMethod as s } from "./usePaymentMethod.js";
5
- import "classnames";
6
5
  import { PAYMENT_METHODS as l } from "../../../shared/constants.js";
7
6
  import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
8
7
  import { RadioGroupField as p } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
9
- const v = () => {
8
+ const h = () => {
10
9
  const { mode: a, watchedType: t } = s(), { t: e } = c("Employee.PaymentMethod"), { setValue: n } = m();
11
10
  if (!(a !== "ADD" && a !== "INITIAL" || t === l.check))
12
11
  return n("hasBankPayload", !0), /* @__PURE__ */ i(u, { children: [
@@ -52,6 +51,6 @@ const v = () => {
52
51
  ] });
53
52
  };
54
53
  export {
55
- v as BankAccountForm
54
+ h as BankAccountForm
56
55
  };
57
56
  //# sourceMappingURL=BankAccountEdit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BankAccountEdit.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountEdit.tsx"],"sourcesContent":["import { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { BankAccountInputs } from './BankAccount'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const BankAccountForm = () => {\n const { mode, watchedType } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const { setValue } = useFormContext<BankAccountInputs>()\n\n if ((mode !== 'ADD' && mode !== 'INITIAL') || watchedType === PAYMENT_METHODS.check) {\n return\n }\n //Used by form schema to determine variant\n setValue('hasBankPayload', true)\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","mode","watchedType","usePaymentMethod","t","useTranslation","setValue","useFormContext","PAYMENT_METHODS","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":";;;;;;;;AAOO,MAAMA,IAAkB,MAAM;AACnC,QAAM,EAAE,MAAAC,GAAM,aAAAC,EAAY,IAAIC,EAAiB,GACzC,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/C,EAAE,UAAAC,EAAS,IAAIC,EAAkC;AAEvD,MAAK,EAAAN,MAAS,SAASA,MAAS,aAAcC,MAAgBM,EAAgB;AAI9E,WAAAF,EAAS,kBAAkB,EAAI,GAI3B,gBAAAG,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAOR,EAAE,WAAW;AAAA,UACpB,cAAcA,EAAE,yBAAyB;AAAA,QAAA;AAAA,MAC3C;AAAA,MAEA,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOR,EAAE,oBAAoB;AAAA,UAC7B,YAAU;AAAA,UACV,aAAaA,EAAE,0BAA0B;AAAA,UACzC,cAAcA,EAAE,2BAA2B;AAAA,QAAA;AAAA,MAC7C;AAAA,MAEA,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOR,EAAE,oBAAoB;AAAA,UAC7B,cAAcA,EAAE,2BAA2B;AAAA,UAC3C,YAAU;AAAA,QAAA;AAAA,MACZ;AAAA,MAEA,gBAAAO;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOT,EAAE,kBAAkB;AAAA,UAC3B,SAAS;AAAA,YACP,EAAE,OAAO,YAAY,OAAOA,EAAE,qBAAqB,EAAE;AAAA,YACrD,EAAE,OAAO,WAAW,OAAOA,EAAE,oBAAoB,EAAE;AAAA,UAAA;AAAA,QACrD;AAAA,MAAA;AAAA,IACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"BankAccountEdit.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountEdit.tsx"],"sourcesContent":["import { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { BankAccountInputs } from './BankAccount'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const BankAccountForm = () => {\n const { mode, watchedType } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const { setValue } = useFormContext<BankAccountInputs>()\n\n if ((mode !== 'ADD' && mode !== 'INITIAL') || watchedType === PAYMENT_METHODS.check) {\n return\n }\n //Used by form schema to determine variant\n setValue('hasBankPayload', true)\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","mode","watchedType","usePaymentMethod","t","useTranslation","setValue","useFormContext","PAYMENT_METHODS","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":";;;;;;;AAOO,MAAMA,IAAkB,MAAM;AACnC,QAAM,EAAE,MAAAC,GAAM,aAAAC,EAAY,IAAIC,EAAiB,GACzC,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/C,EAAE,UAAAC,EAAS,IAAIC,EAAkC;AAEvD,MAAK,EAAAN,MAAS,SAASA,MAAS,aAAcC,MAAgBM,EAAgB;AAI9E,WAAAF,EAAS,kBAAkB,EAAI,GAI3B,gBAAAG,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAOR,EAAE,WAAW;AAAA,UACpB,cAAcA,EAAE,yBAAyB;AAAA,QAAA;AAAA,MAC3C;AAAA,MAEA,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOR,EAAE,oBAAoB;AAAA,UAC7B,YAAU;AAAA,UACV,aAAaA,EAAE,0BAA0B;AAAA,UACzC,cAAcA,EAAE,2BAA2B;AAAA,QAAA;AAAA,MAC7C;AAAA,MAEA,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOR,EAAE,oBAAoB;AAAA,UAC7B,cAAcA,EAAE,2BAA2B;AAAA,UAC3C,YAAU;AAAA,QAAA;AAAA,MACZ;AAAA,MAEA,gBAAAO;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOT,EAAE,kBAAkB;AAAA,UAC3B,SAAS;AAAA,YACP,EAAE,OAAO,YAAY,OAAOA,EAAE,qBAAqB,EAAE;AAAA,YACrD,EAAE,OAAO,WAAW,OAAOA,EAAE,oBAAoB,EAAE;AAAA,UAAA;AAAA,QACrD;AAAA,MAAA;AAAA,IACF,GACF;AAEJ;"}
@@ -2,12 +2,11 @@ import { jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as s } from "react-i18next";
3
3
  import { usePaymentMethod as p } from "./usePaymentMethod.js";
4
4
  import d from "../../../assets/icons/trashcan.svg.js";
5
- import "classnames";
6
5
  import f from "../../Common/hooks/useNumberFormatter.js";
7
6
  import { HamburgerMenu as y } from "../../Common/HamburgerMenu/HamburgerMenu.js";
8
7
  import { useDataView as b } from "../../Common/DataView/useDataView.js";
9
8
  import { DataView as k } from "../../Common/DataView/DataView.js";
10
- function B() {
9
+ function w() {
11
10
  const { bankAccounts: r, paymentMethod: o, mode: i, handleDelete: m, isPending: u } = p(), { t } = s("Employee.PaymentMethod"), a = f(o.splitBy === "Amount" ? "currency" : "percent"), { ...l } = b({
12
11
  data: r,
13
12
  columns: [
@@ -43,6 +42,6 @@ function B() {
43
42
  return /* @__PURE__ */ n(k, { label: t("bankAccountsListLabel"), ...l });
44
43
  }
45
44
  export {
46
- B as BankAccountsList
45
+ w as BankAccountsList
47
46
  };
48
47
  //# sourceMappingURL=BankAccountsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BankAccountsList.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport function BankAccountsList() {\n const { bankAccounts, paymentMethod, mode, handleDelete, isPending } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const format = useNumberFormatter(paymentMethod.splitBy === 'Amount' ? 'currency' : 'percent')\n\n const { ...dataViewProps } = useDataView({\n data: bankAccounts,\n columns: [\n { key: 'name', title: t('nicknameColumn') },\n { key: 'routingNumber', title: t('routingNumberColumn') },\n { key: 'accountType', title: t('accountTypeColumn') },\n {\n key: 'splitAmount',\n title: t('allocationColumn'),\n render: bankAccount => {\n return format(\n paymentMethod.splits?.find(split => split.uuid === bankAccount.uuid)?.splitAmount ?? 0,\n )\n },\n },\n ],\n itemMenu: bankAccount => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('deleteBankAccountCTA'),\n onClick: () => {\n handleDelete(bankAccount.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n isLoading={isPending}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n\n return <DataView label={t('bankAccountsListLabel')} {...dataViewProps} />\n}\n"],"names":["BankAccountsList","bankAccounts","paymentMethod","mode","handleDelete","isPending","usePaymentMethod","useTranslation","format","useNumberFormatter","dataViewProps","useDataView","bankAccount","split","jsx","HamburgerMenu","TrashCanSvg","DataView"],"mappings":";;;;;;;;;AAOO,SAASA,IAAmB;AACjC,QAAM,EAAE,cAAAC,GAAc,eAAAC,GAAe,MAAAC,GAAM,cAAAC,GAAc,WAAAC,MAAcC,EAAiB,GAClF,EAAE,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAASC,EAAmBP,EAAc,YAAY,WAAW,aAAa,SAAS,GAEvF,EAAE,GAAGQ,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMV;AAAA,IACN,SAAS;AAAA,MACP,EAAE,KAAK,QAAQ,OAAO,EAAE,gBAAgB,EAAE;AAAA,MAC1C,EAAE,KAAK,iBAAiB,OAAO,EAAE,qBAAqB,EAAE;AAAA,MACxD,EAAE,KAAK,eAAe,OAAO,EAAE,mBAAmB,EAAE;AAAA,MACpD;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAeW,MACdJ;AAAA,UACLN,EAAc,QAAQ,KAAK,CAAAW,MAASA,EAAM,SAASD,EAAY,IAAI,GAAG,eAAe;AAAA,QACvF;AAAA,MACF;AAAA,IAEJ;AAAA,IACA,UAAU,CAAeA,MAErB,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAX,EAAaQ,EAAY,IAAI;AAAA,YAC/B;AAAA,YACA,MAAM,gBAAAE,EAACE,GAAY,EAAA,eAAW,GAAC,CAAA;AAAA,UAAA;AAAA,QAEnC;AAAA,QACA,cAAc,EAAE,gBAAgB;AAAA,QAChC,WAAWX;AAAA,MAAA;AAAA,IACb;AAAA,EAEJ,CACD;AAED,MAAIF,MAAS;AAEb,6BAAQc,GAAS,EAAA,OAAO,EAAE,uBAAuB,GAAI,GAAGP,GAAe;AACzE;"}
1
+ {"version":3,"file":"BankAccountsList.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport function BankAccountsList() {\n const { bankAccounts, paymentMethod, mode, handleDelete, isPending } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const format = useNumberFormatter(paymentMethod.splitBy === 'Amount' ? 'currency' : 'percent')\n\n const { ...dataViewProps } = useDataView({\n data: bankAccounts,\n columns: [\n { key: 'name', title: t('nicknameColumn') },\n { key: 'routingNumber', title: t('routingNumberColumn') },\n { key: 'accountType', title: t('accountTypeColumn') },\n {\n key: 'splitAmount',\n title: t('allocationColumn'),\n render: bankAccount => {\n return format(\n paymentMethod.splits?.find(split => split.uuid === bankAccount.uuid)?.splitAmount ?? 0,\n )\n },\n },\n ],\n itemMenu: bankAccount => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('deleteBankAccountCTA'),\n onClick: () => {\n handleDelete(bankAccount.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n isLoading={isPending}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n\n return <DataView label={t('bankAccountsListLabel')} {...dataViewProps} />\n}\n"],"names":["BankAccountsList","bankAccounts","paymentMethod","mode","handleDelete","isPending","usePaymentMethod","useTranslation","format","useNumberFormatter","dataViewProps","useDataView","bankAccount","split","jsx","HamburgerMenu","TrashCanSvg","DataView"],"mappings":";;;;;;;;AAOO,SAASA,IAAmB;AACjC,QAAM,EAAE,cAAAC,GAAc,eAAAC,GAAe,MAAAC,GAAM,cAAAC,GAAc,WAAAC,MAAcC,EAAiB,GAClF,EAAE,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAASC,EAAmBP,EAAc,YAAY,WAAW,aAAa,SAAS,GAEvF,EAAE,GAAGQ,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMV;AAAA,IACN,SAAS;AAAA,MACP,EAAE,KAAK,QAAQ,OAAO,EAAE,gBAAgB,EAAE;AAAA,MAC1C,EAAE,KAAK,iBAAiB,OAAO,EAAE,qBAAqB,EAAE;AAAA,MACxD,EAAE,KAAK,eAAe,OAAO,EAAE,mBAAmB,EAAE;AAAA,MACpD;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAeW,MACdJ;AAAA,UACLN,EAAc,QAAQ,KAAK,CAAAW,MAASA,EAAM,SAASD,EAAY,IAAI,GAAG,eAAe;AAAA,QACvF;AAAA,MACF;AAAA,IAEJ;AAAA,IACA,UAAU,CAAeA,MAErB,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAX,EAAaQ,EAAY,IAAI;AAAA,YAC/B;AAAA,YACA,MAAM,gBAAAE,EAACE,GAAY,EAAA,eAAW,GAAC,CAAA;AAAA,UAAA;AAAA,QAEnC;AAAA,QACA,cAAc,EAAE,gBAAgB;AAAA,QAChC,WAAWX;AAAA,MAAA;AAAA,IACb;AAAA,EAEJ,CACD;AAED,MAAIF,MAAS;AAEb,6BAAQc,GAAS,EAAA,OAAO,EAAE,uBAAuB,GAAI,GAAGP,GAAe;AACzE;"}
@@ -2,13 +2,12 @@ import { jsx as r } from "react/jsx-runtime";
2
2
  import { useTranslation as p } from "react-i18next";
3
3
  import { z as o } from "zod";
4
4
  import { usePaymentMethod as m } from "./usePaymentMethod.js";
5
- import "classnames";
6
5
  import { PAYMENT_METHODS as i } from "../../../shared/constants.js";
7
6
  import { RadioGroupField as n } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
8
7
  o.object({
9
8
  type: o.enum(["Check", "Direct Deposit"])
10
9
  });
11
- function f() {
10
+ function y() {
12
11
  const { mode: t } = m(), { t: e } = p("Employee.PaymentMethod");
13
12
  if (!(t !== "INITIAL" && t !== "LIST"))
14
13
  return /* @__PURE__ */ r(
@@ -33,6 +32,6 @@ function f() {
33
32
  );
34
33
  }
35
34
  export {
36
- f as PaymentTypeForm
35
+ y as PaymentTypeForm
37
36
  };
38
37
  //# sourceMappingURL=PaymentTypeForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentTypeForm.js","sources":["../../../../src/components/Employee/PaymentMethod/PaymentTypeForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const PaymentTypeSchema = z.object({\n type: z.enum(['Check', 'Direct Deposit']),\n})\nexport type PaymentTypeInputs = z.input<typeof PaymentTypeSchema>\nexport type PaymentTypePayload = z.output<typeof PaymentTypeSchema>\n\nexport function PaymentTypeForm() {\n const { mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n if (mode !== 'INITIAL' && mode !== 'LIST') return\n return (\n <RadioGroupField\n name=\"type\"\n label={t('paymentFieldsetLegend')}\n shouldVisuallyHideLabel\n options={[\n {\n value: PAYMENT_METHODS.directDeposit,\n label: t('directDepositLabel'),\n description: t('directDepositDescription'),\n },\n {\n value: PAYMENT_METHODS.check,\n label: t('checkLabel'),\n description: t('checkDescription'),\n },\n ]}\n />\n )\n}\n"],"names":["z","PaymentTypeForm","mode","usePaymentMethod","t","useTranslation","jsx","RadioGroupField","PAYMENT_METHODS"],"mappings":";;;;;;;AAMiCA,EAAE,OAAO;AAAA,EACxC,MAAMA,EAAE,KAAK,CAAC,SAAS,gBAAgB,CAAC;AAC1C,CAAC;AAIM,SAASC,IAAkB;AAC1B,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAiB,GAC5B,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB;AACjD,MAAA,EAAAH,MAAS,aAAaA,MAAS;AAEjC,WAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOH,EAAE,uBAAuB;AAAA,QAChC,yBAAuB;AAAA,QACvB,SAAS;AAAA,UACP;AAAA,YACE,OAAOI,EAAgB;AAAA,YACvB,OAAOJ,EAAE,oBAAoB;AAAA,YAC7B,aAAaA,EAAE,0BAA0B;AAAA,UAC3C;AAAA,UACA;AAAA,YACE,OAAOI,EAAgB;AAAA,YACvB,OAAOJ,EAAE,YAAY;AAAA,YACrB,aAAaA,EAAE,kBAAkB;AAAA,UAAA;AAAA,QACnC;AAAA,MACF;AAAA,IACF;AAEJ;"}
1
+ {"version":3,"file":"PaymentTypeForm.js","sources":["../../../../src/components/Employee/PaymentMethod/PaymentTypeForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const PaymentTypeSchema = z.object({\n type: z.enum(['Check', 'Direct Deposit']),\n})\nexport type PaymentTypeInputs = z.input<typeof PaymentTypeSchema>\nexport type PaymentTypePayload = z.output<typeof PaymentTypeSchema>\n\nexport function PaymentTypeForm() {\n const { mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n if (mode !== 'INITIAL' && mode !== 'LIST') return\n return (\n <RadioGroupField\n name=\"type\"\n label={t('paymentFieldsetLegend')}\n shouldVisuallyHideLabel\n options={[\n {\n value: PAYMENT_METHODS.directDeposit,\n label: t('directDepositLabel'),\n description: t('directDepositDescription'),\n },\n {\n value: PAYMENT_METHODS.check,\n label: t('checkLabel'),\n description: t('checkDescription'),\n },\n ]}\n />\n )\n}\n"],"names":["z","PaymentTypeForm","mode","usePaymentMethod","t","useTranslation","jsx","RadioGroupField","PAYMENT_METHODS"],"mappings":";;;;;;AAMiCA,EAAE,OAAO;AAAA,EACxC,MAAMA,EAAE,KAAK,CAAC,SAAS,gBAAgB,CAAC;AAC1C,CAAC;AAIM,SAASC,IAAkB;AAC1B,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAiB,GAC5B,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB;AACjD,MAAA,EAAAH,MAAS,aAAaA,MAAS;AAEjC,WAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOH,EAAE,uBAAuB;AAAA,QAChC,yBAAuB;AAAA,QACvB,SAAS;AAAA,UACP;AAAA,YACE,OAAOI,EAAgB;AAAA,YACvB,OAAOJ,EAAE,oBAAoB;AAAA,YAC7B,aAAaA,EAAE,0BAA0B;AAAA,UAC3C;AAAA,UACA;AAAA,YACE,OAAOI,EAAgB;AAAA,YACvB,OAAOJ,EAAE,YAAY;AAAA,YACrB,aAAaA,EAAE,kBAAkB;AAAA,UAAA;AAAA,QACnC;AAAA,MACF;AAAA,IACF;AAEJ;"}
@@ -5,14 +5,13 @@ import { ErrorMessage as z } from "@hookform/error-message";
5
5
  import y from "dompurify";
6
6
  import { useMemo as j, useEffect as D } from "react";
7
7
  import { usePaymentMethod as N } from "./usePaymentMethod.js";
8
- import "classnames";
9
8
  import { useLocale as q } from "../../../contexts/LocaleProvider/useLocale.js";
10
9
  import { useComponentContext as w } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
10
  import { ReorderableList as I } from "../../Common/ReorderableList/ReorderableList.js";
12
11
  import { SPLIT_BY as h } from "../../../shared/constants.js";
13
12
  import { RadioGroupField as W } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
14
13
  import { NumberInputField as F } from "../../Common/Fields/NumberInputField/NumberInputField.js";
15
- function ie() {
14
+ function oe() {
16
15
  const { paymentMethod: r, bankAccounts: m, mode: c } = N(), {
17
16
  control: s,
18
17
  setValue: o,
@@ -169,6 +168,6 @@ function G({
169
168
  ) }, r.uuid);
170
169
  }
171
170
  export {
172
- ie as Split
171
+ oe as Split
173
172
  };
174
173
  //# sourceMappingURL=Split.js.map