@gusto/embedded-react-sdk 0.11.3-rc.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/CHANGELOG.md +181 -0
  2. package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
  3. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  4. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  5. package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -6
  6. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  7. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
  8. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  9. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
  10. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +3 -2
  12. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  16. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
  18. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +6 -5
  20. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +11 -10
  22. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  24. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  26. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  27. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  28. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +8 -9
  29. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  30. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  31. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  32. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +8 -9
  33. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  34. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  35. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  36. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
  37. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  38. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
  39. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  40. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
  41. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  42. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  43. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  44. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -6
  45. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  46. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  47. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  48. package/dist/components/Company/FederalTaxes/Actions.js +5 -6
  49. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  50. package/dist/components/Company/FederalTaxes/FederalTaxes.js +13 -12
  51. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  52. package/dist/components/Company/FederalTaxes/Form.js +3 -4
  53. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  54. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  55. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  56. package/dist/components/Company/Industry/Actions.js +2 -3
  57. package/dist/components/Company/Industry/Actions.js.map +1 -1
  58. package/dist/components/Company/Industry/Context.js +6 -7
  59. package/dist/components/Company/Industry/Context.js.map +1 -1
  60. package/dist/components/Company/Industry/Edit.js +4 -5
  61. package/dist/components/Company/Industry/Edit.js.map +1 -1
  62. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  63. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  64. package/dist/components/Company/Locations/LocationForm/Form.js +6 -5
  65. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  66. package/dist/components/Company/Locations/LocationForm/LocationForm.js +11 -10
  67. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  68. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  69. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  70. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -7
  71. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  72. package/dist/components/Company/Locations/LocationsList/List.js +2 -3
  73. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  74. package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -6
  75. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  76. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  77. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  78. package/dist/components/Company/OnboardingOverview/Completed.js +10 -11
  79. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  80. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -7
  81. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  82. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -2
  83. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  84. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  85. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  86. package/dist/components/Company/PaySchedule/PaySchedule.js +34 -33
  87. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  88. package/dist/components/Company/PaySchedule/_parts/Actions.js +9 -10
  89. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  90. package/dist/components/Company/PaySchedule/_parts/Edit.js +17 -16
  91. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  92. package/dist/components/Company/PaySchedule/_parts/Head.js +6 -7
  93. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  94. package/dist/components/Company/PaySchedule/_parts/List.js +11 -12
  95. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  96. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  97. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  98. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  99. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  100. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  101. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  102. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
  103. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  104. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
  105. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  106. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  107. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  108. package/dist/components/Contractor/Address/Address.js +5 -4
  109. package/dist/components/Contractor/Address/Address.js.map +1 -1
  110. package/dist/components/Contractor/Address/Form.js +4 -3
  111. package/dist/components/Contractor/Address/Form.js.map +1 -1
  112. package/dist/components/Contractor/Address/useAddress.js +5 -6
  113. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  114. package/dist/components/Contractor/ContractorList/index.d.ts +16 -0
  115. package/dist/components/Contractor/ContractorList/index.js +125 -0
  116. package/dist/components/Contractor/ContractorList/index.js.map +1 -0
  117. package/dist/components/Contractor/{List → ContractorList}/useContractorList.d.ts +1 -3
  118. package/dist/components/Contractor/{List → ContractorList}/useContractorList.js +9 -10
  119. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -0
  120. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +2 -0
  121. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +25 -0
  122. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -0
  123. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +26 -0
  124. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +71 -0
  125. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -0
  126. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +9 -0
  127. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +119 -0
  128. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -0
  129. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -6
  130. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  131. package/dist/components/Contractor/Profile/ContractorProfile.js +31 -17
  132. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
  133. package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +1 -1
  134. package/dist/components/Contractor/Profile/ContractorProfileForm.js +40 -44
  135. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
  136. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +13 -12
  137. package/dist/components/Contractor/Profile/useContractorProfile.js +144 -145
  138. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  139. package/dist/components/Contractor/Submit/Submit.d.ts +7 -0
  140. package/dist/components/Contractor/Submit/Submit.js +77 -0
  141. package/dist/components/Contractor/Submit/Submit.js.map +1 -0
  142. package/dist/components/Contractor/Submit/SubmitDone.js +11 -11
  143. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  144. package/dist/components/Contractor/index.d.ts +3 -2
  145. package/dist/components/Contractor/index.js +10 -8
  146. package/dist/components/Contractor/index.js.map +1 -1
  147. package/dist/components/Employee/Compensation/Actions.js +1 -1
  148. package/dist/components/Employee/Compensation/Edit.js +12 -12
  149. package/dist/components/Employee/Compensation/List.js +22 -23
  150. package/dist/components/Employee/Compensation/List.js.map +1 -1
  151. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
  152. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  153. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +8 -8
  154. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -7
  155. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  156. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +8 -7
  157. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  158. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
  159. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  160. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  161. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  162. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +10 -9
  163. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  164. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  165. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  166. package/dist/components/Employee/EmployeeList/Actions.js +2 -3
  167. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  168. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  169. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  170. package/dist/components/Employee/EmployeeList/Head.js +5 -6
  171. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  172. package/dist/components/Employee/EmployeeList/List.js +12 -12
  173. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  174. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  175. package/dist/components/Employee/Landing/Landing.js +8 -8
  176. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  177. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  178. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  179. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
  180. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -9
  181. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  182. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  183. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  184. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  185. package/dist/components/Employee/Profile/Actions.js +6 -7
  186. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  187. package/dist/components/Employee/Profile/HomeAddress.js +6 -5
  188. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  189. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +22 -21
  190. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  191. package/dist/components/Employee/Profile/useProfile.js +3 -4
  192. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  193. package/dist/components/Employee/Taxes/Actions.js +8 -9
  194. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  195. package/dist/components/Employee/Taxes/FederalForm.js +12 -13
  196. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  197. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  198. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  199. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  200. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  201. package/dist/i18n/I18n.js +1 -1
  202. package/dist/i18n/I18n.js.map +1 -1
  203. package/dist/i18n/en/Contractor.ContractorList.json.js +14 -10
  204. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  205. package/dist/i18n/en/Contractor.Submit.json.js +22 -0
  206. package/dist/i18n/en/Contractor.Submit.json.js.map +1 -0
  207. package/dist/shared/constants.d.ts +12 -2
  208. package/dist/shared/constants.js +12 -6
  209. package/dist/shared/constants.js.map +1 -1
  210. package/dist/style.css +1 -1
  211. package/dist/types/i18next.d.ts +25 -13
  212. package/package.json +2 -1
  213. package/dist/components/Contractor/List/index.d.ts +0 -25
  214. package/dist/components/Contractor/List/index.js +0 -81
  215. package/dist/components/Contractor/List/index.js.map +0 -1
  216. package/dist/components/Contractor/List/useContractorList.js.map +0 -1
  217. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.d.ts +0 -6
  218. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js +0 -27
  219. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +0 -1
  220. package/dist/components/Contractor/Submit/index.d.ts +0 -6
  221. package/dist/components/Contractor/Submit/index.js +0 -20
  222. package/dist/components/Contractor/Submit/index.js.map +0 -1
  223. package/dist/components/Contractor/Submit/index.module.scss.js +0 -8
  224. package/dist/components/Contractor/Submit/index.module.scss.js.map +0 -1
  225. package/dist/i18n/en/Contractor.ContractorSubmit.json.js +0 -18
  226. package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +0 -1
@@ -1,7 +1,8 @@
1
1
  import "./types/i18next.d.ts"
2
2
  export { PaymentMethod } from './PaymentMethod/PaymentMethod';
3
3
  export { Address } from './Address';
4
- export { ContractorListWithApi as ContractorList } from './List';
4
+ export { ContractorList } from './ContractorList';
5
5
  export { NewHireReport } from './NewHireReport/NewHireReport';
6
- export { ContractorSubmitWithApi as ContractorSubmit } from './Submit/ContractorSubmitWithApi';
6
+ export { ContractorSubmit } from './Submit/Submit';
7
7
  export { ContractorProfile } from './Profile';
8
+ export { OnboardingFlow } from './OnboardingFlow/OnboardingFlow';
@@ -1,15 +1,17 @@
1
1
  import { PaymentMethod as t } from "./PaymentMethod/PaymentMethod.js";
2
- import { ContractorListWithApi as i } from "./List/index.js";
2
+ import { ContractorList as m } from "./ContractorList/index.js";
3
3
  import { NewHireReport as p } from "./NewHireReport/NewHireReport.js";
4
- import { ContractorSubmitWithApi as f } from "./Submit/ContractorSubmitWithApi.js";
5
- import { Address as s } from "./Address/Address.js";
6
- import { ContractorProfile as c } from "./Profile/ContractorProfile.js";
4
+ import { ContractorSubmit as n } from "./Submit/Submit.js";
5
+ import { OnboardingFlow as i } from "./OnboardingFlow/OnboardingFlow.js";
6
+ import { Address as c } from "./Address/Address.js";
7
+ import { ContractorProfile as C } from "./Profile/ContractorProfile.js";
7
8
  export {
8
- s as Address,
9
- i as ContractorList,
10
- c as ContractorProfile,
11
- f as ContractorSubmit,
9
+ c as Address,
10
+ m as ContractorList,
11
+ C as ContractorProfile,
12
+ n as ContractorSubmit,
12
13
  p as NewHireReport,
14
+ i as OnboardingFlow,
13
15
  t as PaymentMethod
14
16
  };
15
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -3,8 +3,8 @@ import { useFormContext as l, useWatch as d } from "react-hook-form";
3
3
  import { useTranslation as T } from "react-i18next";
4
4
  import { useCompensation as O } from "./useCompensation.js";
5
5
  import "classnames";
6
- import { FlsaStatus as a } from "../../../shared/constants.js";
7
6
  import { ActionsLayout as u } from "../../Common/ActionsLayout/ActionsLayout.js";
7
+ import { FlsaStatus as a } from "../../../shared/constants.js";
8
8
  import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
9
  const h = () => {
10
10
  const { isPending: s, mode: t, submitWithEffect: o, handleAdd: D, handleCancelAddJob: m, primaryFlsaStatus: r } = O(), { t: n } = T("Employee.Compensation"), { control: I } = l(), c = d({ control: I, name: "flsaStatus" }), e = C();
@@ -6,17 +6,17 @@ import { useCompensation as R, rateMinimumError as Y, rateExemptThresholdError a
6
6
  import { FlsaStatus as a, PAY_PERIODS as r, FLSA_OVERTIME_SALARY_LIMIT as N } from "../../../shared/constants.js";
7
7
  import x from "../../Common/hooks/useNumberFormatter.js";
8
8
  import "classnames";
9
- import { RadioGroupField as j } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
10
- import { TextInputField as X } from "../../Common/Fields/TextInputField/TextInputField.js";
11
- import { NumberInputField as B } from "../../Common/Fields/NumberInputField/NumberInputField.js";
12
- import { SwitchField as J } from "../../Common/Fields/SwitchField/SwitchField.js";
13
- import { useComponentContext as K } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import { WA_RISK_CLASS_CODES as q } from "../../../models/WA_RISK_CODES.js";
9
+ import { useComponentContext as j } from "../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ import { WA_RISK_CLASS_CODES as X } from "../../../models/WA_RISK_CODES.js";
11
+ import { TextInputField as B } from "../../Common/Fields/TextInputField/TextInputField.js";
15
12
  import { SelectField as b } from "../../Common/Fields/SelectField/SelectField.js";
13
+ import { NumberInputField as J } from "../../Common/Fields/NumberInputField/NumberInputField.js";
14
+ import { SwitchField as K } from "../../Common/Fields/SwitchField/SwitchField.js";
15
+ import { RadioGroupField as q } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
16
16
  import { ComboBoxField as H } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
17
17
  const pe = () => {
18
- const { t: e } = P("Employee.Compensation"), l = x("currency"), m = K(), S = F(
19
- () => q.map(({ code: o, description: D }) => ({ value: o, label: D })),
18
+ const { t: e } = P("Employee.Compensation"), l = x("currency"), m = j(), S = F(
19
+ () => X.map(({ code: o, description: D }) => ({ value: o, label: D })),
20
20
  []
21
21
  ), {
22
22
  control: f,
@@ -45,7 +45,7 @@ const pe = () => {
45
45
  limit: l(N)
46
46
  })), /* @__PURE__ */ d(O, { children: [
47
47
  /* @__PURE__ */ t(
48
- X,
48
+ B,
49
49
  {
50
50
  name: "jobTitle",
51
51
  label: e("jobTitle"),
@@ -77,7 +77,7 @@ const pe = () => {
77
77
  }
78
78
  ),
79
79
  /* @__PURE__ */ t(
80
- B,
80
+ J,
81
81
  {
82
82
  name: "rate",
83
83
  label: e("amount"),
@@ -90,7 +90,7 @@ const pe = () => {
90
90
  ),
91
91
  A && /* @__PURE__ */ d(O, { children: [
92
92
  /* @__PURE__ */ t(
93
- J,
93
+ K,
94
94
  {
95
95
  name: "adjustForMinimumWage",
96
96
  label: e("adjustForMinimumWage"),
@@ -126,7 +126,7 @@ const pe = () => {
126
126
  v && /* @__PURE__ */ t(m.Checkbox, { label: e("twoPercentStakeholderLabel"), name: "twoPercentShareholder" }),
127
127
  W === "WA" && /* @__PURE__ */ d(O, { children: [
128
128
  /* @__PURE__ */ t(
129
- j,
129
+ q,
130
130
  {
131
131
  name: "stateWcCovered",
132
132
  label: e("stateWcCoveredLabel"),
@@ -4,58 +4,57 @@ import { useCompensation as d } from "./useCompensation.js";
4
4
  import C from "../../../assets/icons/pencil.svg.js";
5
5
  import c from "../../../assets/icons/trashcan.svg.js";
6
6
  import "classnames";
7
- import "../../../shared/constants.js";
8
7
  import { HamburgerMenu as f } from "../../Common/HamburgerMenu/HamburgerMenu.js";
9
8
  import { useDataView as y } from "../../Common/DataView/useDataView.js";
10
9
  import { DataView as g } from "../../Common/DataView/DataView.js";
11
- const U = () => {
12
- const { employeeJobs: i, mode: o, isPending: r, handleEdit: l, handleDelete: s } = d(), { t: e } = p("Employee.Compensation"), { ...m } = y({
10
+ const P = () => {
11
+ const { employeeJobs: i, mode: o, isPending: r, handleEdit: l, handleDelete: s } = d(), { t } = p("Employee.Compensation"), { ...m } = y({
13
12
  data: i,
14
13
  columns: [
15
14
  {
16
15
  key: "title",
17
- title: e("allCompensations.jobColumn"),
18
- render: (t) => t.title || ""
16
+ title: t("allCompensations.jobColumn"),
17
+ render: (e) => e.title || ""
19
18
  },
20
19
  {
21
20
  key: "flsaStatus",
22
- title: e("allCompensations.typeColumn"),
23
- render: (t) => {
24
- const n = t.compensations?.find(
25
- (u) => u.uuid === t.currentCompensationUuid
21
+ title: t("allCompensations.typeColumn"),
22
+ render: (e) => {
23
+ const n = e.compensations?.find(
24
+ (u) => u.uuid === e.currentCompensationUuid
26
25
  )?.flsaStatus;
27
- return n !== void 0 ? e(`flsaStatusLabels.${n}`) : null;
26
+ return n !== void 0 ? t(`flsaStatusLabels.${n}`) : null;
28
27
  }
29
28
  },
30
29
  {
31
30
  key: "rate",
32
- title: e("allCompensations.amountColumn"),
33
- render: (t) => t.rate?.toString() || ""
31
+ title: t("allCompensations.amountColumn"),
32
+ render: (e) => e.rate?.toString() || ""
34
33
  },
35
34
  {
36
35
  key: "paymentUnit",
37
- title: e("allCompensations.perColumn"),
38
- render: (t) => t.paymentUnit || ""
36
+ title: t("allCompensations.perColumn"),
37
+ render: (e) => e.paymentUnit || ""
39
38
  }
40
39
  ],
41
- itemMenu: (t) => /* @__PURE__ */ a(
40
+ itemMenu: (e) => /* @__PURE__ */ a(
42
41
  f,
43
42
  {
44
- triggerLabel: e("hamburgerTitle"),
43
+ triggerLabel: t("hamburgerTitle"),
45
44
  items: [
46
45
  {
47
- label: e("allCompensations.editCta"),
46
+ label: t("allCompensations.editCta"),
48
47
  icon: /* @__PURE__ */ a(C, { "aria-hidden": !0 }),
49
48
  onClick: () => {
50
- l(t.uuid);
49
+ l(e.uuid);
51
50
  }
52
51
  },
53
- ...t.primary ? [] : [
52
+ ...e.primary ? [] : [
54
53
  {
55
- label: e("allCompensations.deleteCta"),
54
+ label: t("allCompensations.deleteCta"),
56
55
  icon: /* @__PURE__ */ a(c, { "aria-hidden": !0 }),
57
56
  onClick: () => {
58
- s(t.uuid);
57
+ s(e.uuid);
59
58
  }
60
59
  }
61
60
  ]
@@ -65,9 +64,9 @@ const U = () => {
65
64
  )
66
65
  });
67
66
  if (o === "LIST")
68
- return /* @__PURE__ */ a(g, { "data-testid": "data-view", label: e("allCompensations.tableLabel"), ...m });
67
+ return /* @__PURE__ */ a(g, { "data-testid": "data-view", label: t("allCompensations.tableLabel"), ...m });
69
68
  };
70
69
  export {
71
- U as List
70
+ P as List
72
71
  };
73
72
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/Compensation/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport { useCompensation } from './useCompensation'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { employeeJobs, mode, isPending, handleEdit, handleDelete } = useCompensation()\n const { t } = useTranslation('Employee.Compensation')\n\n const { ...dataViewProps } = useDataView({\n data: employeeJobs,\n columns: [\n {\n key: 'title',\n title: t('allCompensations.jobColumn'),\n render: (job: Job) => job.title || '',\n },\n {\n key: 'flsaStatus',\n title: t('allCompensations.typeColumn'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : null\n },\n },\n {\n key: 'rate',\n title: t('allCompensations.amountColumn'),\n render: (job: Job) => job.rate?.toString() || '',\n },\n {\n key: 'paymentUnit',\n title: t('allCompensations.perColumn'),\n render: (job: Job) => job.paymentUnit || '',\n },\n ],\n itemMenu: (job: Job) => (\n <HamburgerMenu\n triggerLabel={t('hamburgerTitle')}\n items={[\n {\n label: t('allCompensations.editCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job.uuid)\n },\n },\n ...(!job.primary\n ? [\n {\n label: t('allCompensations.deleteCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n handleDelete(job.uuid)\n },\n },\n ]\n : []),\n ]}\n isLoading={isPending}\n />\n ),\n })\n\n if (mode !== 'LIST') {\n return\n }\n\n return (\n <DataView data-testid=\"data-view\" label={t('allCompensations.tableLabel')} {...dataViewProps} />\n )\n}\n"],"names":["List","employeeJobs","mode","isPending","handleEdit","handleDelete","useCompensation","t","useTranslation","dataViewProps","useDataView","job","flsaStatus","comp","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,WAAAC,GAAW,YAAAC,GAAY,cAAAC,EAAA,IAAiBC,EAAA,GAC9D,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAE9C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMT;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOM,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACI,MAAaA,EAAI,SAAS;AAAA,MAAA;AAAA,MAErC;AAAA,QACE,KAAK;AAAA,QACL,OAAOJ,EAAE,6BAA6B;AAAA,QACtC,QAAQ,CAACI,MAAa;AACpB,gBAAMC,IAAaD,EAAI,eAAe;AAAA,YACpC,CAAAE,MAAQA,EAAK,SAASF,EAAI;AAAA,UAAA,GACzB;AACH,iBAAOC,MAAe,SAAYL,EAAE,oBAAoBK,CAAU,EAAE,IAAI;AAAA,QAC1E;AAAA,MAAA;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAOL,EAAE,+BAA+B;AAAA,QACxC,QAAQ,CAACI,MAAaA,EAAI,MAAM,cAAc;AAAA,MAAA;AAAA,MAEhD;AAAA,QACE,KAAK;AAAA,QACL,OAAOJ,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACI,MAAaA,EAAI,eAAe;AAAA,MAAA;AAAA,IAC3C;AAAA,IAEF,UAAU,CAACA,MACT,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,cAAcR,EAAE,gBAAgB;AAAA,QAChC,OAAO;AAAA,UACL;AAAA,YACE,OAAOA,EAAE,0BAA0B;AAAA,YACnC,MAAM,gBAAAO,EAACE,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,SAAS,MAAM;AACb,cAAAZ,EAAWO,EAAI,IAAI;AAAA,YACrB;AAAA,UAAA;AAAA,UAEF,GAAKA,EAAI,UAUL,CAAA,IATA;AAAA,YACE;AAAA,cACE,OAAOJ,EAAE,4BAA4B;AAAA,cACrC,MAAM,gBAAAO,EAACG,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,cAC/B,SAAS,MAAM;AACb,gBAAAZ,EAAaM,EAAI,IAAI;AAAA,cACvB;AAAA,YAAA;AAAA,UACF;AAAA,QAED;AAAA,QAEP,WAAWR;AAAA,MAAA;AAAA,IAAA;AAAA,EACb,CAEH;AAED,MAAID,MAAS;AAIb,WACE,gBAAAY,EAACI,KAAS,eAAY,aAAY,OAAOX,EAAE,6BAA6B,GAAI,GAAGE,GAAe;AAElG;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/Compensation/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport { useCompensation } from './useCompensation'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { employeeJobs, mode, isPending, handleEdit, handleDelete } = useCompensation()\n const { t } = useTranslation('Employee.Compensation')\n\n const { ...dataViewProps } = useDataView({\n data: employeeJobs,\n columns: [\n {\n key: 'title',\n title: t('allCompensations.jobColumn'),\n render: (job: Job) => job.title || '',\n },\n {\n key: 'flsaStatus',\n title: t('allCompensations.typeColumn'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : null\n },\n },\n {\n key: 'rate',\n title: t('allCompensations.amountColumn'),\n render: (job: Job) => job.rate?.toString() || '',\n },\n {\n key: 'paymentUnit',\n title: t('allCompensations.perColumn'),\n render: (job: Job) => job.paymentUnit || '',\n },\n ],\n itemMenu: (job: Job) => (\n <HamburgerMenu\n triggerLabel={t('hamburgerTitle')}\n items={[\n {\n label: t('allCompensations.editCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job.uuid)\n },\n },\n ...(!job.primary\n ? [\n {\n label: t('allCompensations.deleteCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n handleDelete(job.uuid)\n },\n },\n ]\n : []),\n ]}\n isLoading={isPending}\n />\n ),\n })\n\n if (mode !== 'LIST') {\n return\n }\n\n return (\n <DataView data-testid=\"data-view\" label={t('allCompensations.tableLabel')} {...dataViewProps} />\n )\n}\n"],"names":["List","employeeJobs","mode","isPending","handleEdit","handleDelete","useCompensation","useTranslation","dataViewProps","useDataView","job","flsaStatus","comp","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,WAAAC,GAAW,YAAAC,GAAY,cAAAC,EAAA,IAAiBC,EAAA,GAC9D,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAE9C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACS,MAAaA,EAAI,SAAS;AAAA,MAAA;AAAA,MAErC;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,6BAA6B;AAAA,QACtC,QAAQ,CAACA,MAAa;AACpB,gBAAMC,IAAaD,EAAI,eAAe;AAAA,YACpC,CAAAE,MAAQA,EAAK,SAASF,EAAI;AAAA,UAAA,GACzB;AACH,iBAAOC,MAAe,SAAY,EAAE,oBAAoBA,CAAU,EAAE,IAAI;AAAA,QAC1E;AAAA,MAAA;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,+BAA+B;AAAA,QACxC,QAAQ,CAACD,MAAaA,EAAI,MAAM,cAAc;AAAA,MAAA;AAAA,MAEhD;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACA,MAAaA,EAAI,eAAe;AAAA,MAAA;AAAA,IAC3C;AAAA,IAEF,UAAU,CAACA,MACT,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,cAAc,EAAE,gBAAgB;AAAA,QAChC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,0BAA0B;AAAA,YACnC,MAAM,gBAAAD,EAACE,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,SAAS,MAAM;AACb,cAAAX,EAAWM,EAAI,IAAI;AAAA,YACrB;AAAA,UAAA;AAAA,UAEF,GAAKA,EAAI,UAUL,CAAA,IATA;AAAA,YACE;AAAA,cACE,OAAO,EAAE,4BAA4B;AAAA,cACrC,MAAM,gBAAAG,EAACG,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,cAC/B,SAAS,MAAM;AACb,gBAAAX,EAAaK,EAAI,IAAI;AAAA,cACvB;AAAA,YAAA;AAAA,UACF;AAAA,QAED;AAAA,QAEP,WAAWP;AAAA,MAAA;AAAA,IAAA;AAAA,EACb,CAEH;AAED,MAAID,MAAS;AAIb,WACE,gBAAAW,EAACI,KAAS,eAAY,aAAY,OAAO,EAAE,6BAA6B,GAAI,GAAGT,GAAe;AAElG;"}
@@ -12,13 +12,13 @@ import { useBase as H } from "../../../Base/useBase.js";
12
12
  import { Form as V } from "../../../Common/Form/Form.js";
13
13
  import { Flex as W } from "../../../Common/Flex/Flex.js";
14
14
  import "classnames";
15
+ import { ActionsLayout as J } from "../../../Common/ActionsLayout/ActionsLayout.js";
16
+ import { useComponentDictionary as K, useI18n as Q } from "../../../../i18n/I18n.js";
15
17
  import { componentEvents as p } from "../../../../shared/constants.js";
18
+ import { useComponentContext as X } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
19
+ import { TextInputField as Z } from "../../../Common/Fields/TextInputField/TextInputField.js";
16
20
  import { RadioGroupField as x } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
17
- import { TextInputField as J } from "../../../Common/Fields/TextInputField/TextInputField.js";
18
- import { ActionsLayout as K } from "../../../Common/ActionsLayout/ActionsLayout.js";
19
21
  import { NumberInputField as f } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
20
- import { useComponentDictionary as Q, useI18n as X } from "../../../../i18n/I18n.js";
21
- import { useComponentContext as Z } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
22
22
  import { CheckboxField as $ } from "../../../Common/Fields/CheckboxField/CheckboxField.js";
23
23
  const ee = i.object({
24
24
  active: i.boolean(),
@@ -35,8 +35,8 @@ function Me(t) {
35
35
  return /* @__PURE__ */ n(z, { ...t, children: /* @__PURE__ */ n(ne, { ...t, children: t.children }) });
36
36
  }
37
37
  function ne({ className: t, children: b, employeeId: g, deductionId: h, dictionary: y }) {
38
- const { onEvent: u, baseSubmitHandler: P } = H(), { t: r } = N("Employee.Deductions"), m = Z();
39
- Q("Employee.Deductions", y), X("Employee.Deductions");
38
+ const { onEvent: u, baseSubmitHandler: P } = H(), { t: r } = N("Employee.Deductions"), m = X();
39
+ K("Employee.Deductions", y), Q("Employee.Deductions");
40
40
  const { data: C } = k({ employeeId: g }), e = h ? C.garnishmentList?.find((c) => c.uuid === h) ?? null : null, { mutateAsync: M, isPending: O } = j(), { mutateAsync: L, isPending: T } = Y(), a = B(() => ({
41
41
  amount: e?.amount ? Number(e.amount) : 0,
42
42
  description: e?.description ?? "",
@@ -83,7 +83,7 @@ function ne({ className: t, children: b, employeeId: g, deductionId: h, dictiona
83
83
  }, S = r(e ? "editDeductionTitle" : "addDeductionTitle");
84
84
  return /* @__PURE__ */ n("section", { className: t, children: /* @__PURE__ */ n(w, { ...s, children: /* @__PURE__ */ n(V, { onSubmit: s.handleSubmit(R), children: /* @__PURE__ */ n(W, { flexDirection: "column", gap: 32, children: b || /* @__PURE__ */ d(E, { children: [
85
85
  /* @__PURE__ */ n(m.Heading, { as: "h2", children: S }),
86
- /* @__PURE__ */ n(J, { name: "description", label: r("descriptionLabel"), isRequired: !0 }),
86
+ /* @__PURE__ */ n(Z, { name: "description", label: r("descriptionLabel"), isRequired: !0 }),
87
87
  /* @__PURE__ */ n(
88
88
  x,
89
89
  {
@@ -122,7 +122,7 @@ function ne({ className: t, children: b, employeeId: g, deductionId: h, dictiona
122
122
  /* @__PURE__ */ n(f, { name: "payPeriodMaximum", label: "Pay period maximum", min: 0 })
123
123
  ] }),
124
124
  /* @__PURE__ */ n($, { name: "courtOrdered", label: r("courtOrderedLabel") }),
125
- /* @__PURE__ */ d(K, { children: [
125
+ /* @__PURE__ */ d(J, { children: [
126
126
  /* @__PURE__ */ n(m.Button, { variant: "secondary", onClick: q, children: r("cancelCta") }),
127
127
  /* @__PURE__ */ n(m.Button, { type: "submit", isLoading: F, children: r(e ? "continueCta" : "addDeductionCta") })
128
128
  ] })
@@ -6,13 +6,13 @@ import { BaseComponent as _ } from "../../../Base/Base.js";
6
6
  import { useBase as k } from "../../../Base/useBase.js";
7
7
  import { Flex as w } from "../../../Common/Flex/Flex.js";
8
8
  import "classnames";
9
- import { componentEvents as a } from "../../../../shared/constants.js";
10
9
  import { ActionsLayout as I } from "../../../Common/ActionsLayout/ActionsLayout.js";
11
10
  import u from "../../../Common/hooks/useNumberFormatter.js";
12
11
  import M from "../../../../assets/icons/pencil.svg.js";
13
12
  import U from "../../../../assets/icons/trashcan.svg.js";
14
13
  import { HamburgerMenu as B } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
15
14
  import { useComponentDictionary as S, useI18n as Y } from "../../../../i18n/I18n.js";
15
+ import { componentEvents as a } from "../../../../shared/constants.js";
16
16
  import { useComponentContext as q } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
17
17
  import { useDataView as F } from "../../../Common/DataView/useDataView.js";
18
18
  import { DataView as H } from "../../../Common/DataView/DataView.js";
@@ -7,18 +7,18 @@ import { BaseComponent as C } from "../../../Base/Base.js";
7
7
  import { useBase as b } from "../../../Base/useBase.js";
8
8
  import { Form as N } from "../../../Common/Form/Form.js";
9
9
  import "classnames";
10
+ import { ActionsLayout as v } from "../../../Common/ActionsLayout/ActionsLayout.js";
11
+ import { useComponentDictionary as F, useI18n as I } from "../../../../i18n/I18n.js";
10
12
  import { componentEvents as s } from "../../../../shared/constants.js";
11
- import { RadioGroupField as v } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
12
- import { ActionsLayout as F } from "../../../Common/ActionsLayout/ActionsLayout.js";
13
- import { useComponentDictionary as I, useI18n as Y } from "../../../../i18n/I18n.js";
14
- import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import { useComponentContext as Y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import { RadioGroupField as y } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
15
15
  const L = m.object({ includeDeductions: m.enum(["Yes", "No"]) });
16
16
  function G(n) {
17
17
  return /* @__PURE__ */ e(C, { ...n, children: /* @__PURE__ */ e(_, { ...n, children: n.children }) });
18
18
  }
19
19
  function _({ className: n, children: t, dictionary: u }) {
20
- const { onEvent: i } = b(), { t: o } = D("Employee.Deductions"), r = y();
21
- I("Employee.Deductions", u), Y("Employee.Deductions");
20
+ const { onEvent: i } = b(), { t: o } = D("Employee.Deductions"), r = Y();
21
+ F("Employee.Deductions", u), I("Employee.Deductions");
22
22
  const c = f({
23
23
  resolver: h(L),
24
24
  defaultValues: { includeDeductions: "No" }
@@ -28,7 +28,7 @@ function _({ className: n, children: t, dictionary: u }) {
28
28
  return /* @__PURE__ */ e("section", { className: n, children: /* @__PURE__ */ e(E, { ...c, children: /* @__PURE__ */ e(N, { onSubmit: c.handleSubmit(d), children: t || /* @__PURE__ */ p(a, { children: [
29
29
  /* @__PURE__ */ e(r.Heading, { as: "h2", children: o("pageTitle") }),
30
30
  /* @__PURE__ */ e(
31
- v,
31
+ y,
32
32
  {
33
33
  name: "includeDeductions",
34
34
  isRequired: !0,
@@ -40,7 +40,7 @@ function _({ className: n, children: t, dictionary: u }) {
40
40
  ]
41
41
  }
42
42
  ),
43
- /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(r.Button, { type: "submit", children: o("continueCta") }) })
43
+ /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(r.Button, { type: "submit", children: o("continueCta") }) })
44
44
  ] }) }) }) });
45
45
  }
46
46
  export {
@@ -1,15 +1,14 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
- import { useDocumentList as m } from "./useDocumentList.js";
3
+ import { useDocumentList as s } from "./useDocumentList.js";
4
4
  import "classnames";
5
- import "../../../../shared/constants.js";
6
- import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
6
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function h() {
9
- const { t } = r("Employee.DocumentSigner"), { handleContinue: n, hasSignedAllForms: i } = m(), e = c();
10
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(e.Button, { onClick: n, isLoading: !1, isDisabled: !i, children: t("continueCta") }) });
7
+ function C() {
8
+ const { t: n } = r("Employee.DocumentSigner"), { handleContinue: t, hasSignedAllForms: i } = s(), e = c();
9
+ return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(e.Button, { onClick: t, isLoading: !1, isDisabled: !i, children: n("continueCta") }) });
11
10
  }
12
11
  export {
13
- h as Actions
12
+ C as Actions
14
13
  };
15
14
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAA,IAAsBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAA,IAAsBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAAH,EAAE,aAAa,GAClB,GACF;AAEJ;"}
@@ -9,13 +9,14 @@ import { useBase as L } from "../../../Base/useBase.js";
9
9
  import { useI18n as S } from "../../../../i18n/I18n.js";
10
10
  import { componentEvents as m } from "../../../../shared/constants.js";
11
11
  import { Flex as g } from "../../../Common/Flex/Flex.js";
12
+ import "react-i18next";
12
13
  import "classnames";
13
- function B(e) {
14
+ function N(e) {
14
15
  return /* @__PURE__ */ o(F, { ...e, children: /* @__PURE__ */ o(O, { ...e }) });
15
16
  }
16
- function O({ employeeId: e, className: s, children: n }) {
17
+ function O({ employeeId: e, className: s, children: t }) {
17
18
  S("Employee.DocumentSigner");
18
- const { onEvent: t } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, p = i.every((r) => !r.requiresSigning);
19
+ const { onEvent: n } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, p = i.every((r) => !r.requiresSigning);
19
20
  return /* @__PURE__ */ o("section", { className: s, children: /* @__PURE__ */ o(
20
21
  h,
21
22
  {
@@ -23,14 +24,14 @@ function O({ employeeId: e, className: s, children: n }) {
23
24
  employeeForms: i,
24
25
  hasSignedAllForms: p,
25
26
  handleContinue: () => {
26
- t(m.EMPLOYEE_FORMS_DONE);
27
+ n(m.EMPLOYEE_FORMS_DONE);
27
28
  },
28
29
  handleRequestFormToSign: (r) => {
29
- t(m.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: r.uuid });
30
+ n(m.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: r.uuid });
30
31
  },
31
32
  documentListError: c
32
33
  },
33
- children: n || /* @__PURE__ */ l(g, { flexDirection: "column", children: [
34
+ children: t || /* @__PURE__ */ l(g, { flexDirection: "column", children: [
34
35
  /* @__PURE__ */ o(d, {}),
35
36
  /* @__PURE__ */ o(E, {}),
36
37
  /* @__PURE__ */ o(a, {})
@@ -39,6 +40,6 @@ function O({ employeeId: e, className: s, children: n }) {
39
40
  ) });
40
41
  }
41
42
  export {
42
- B as DocumentList
43
+ N as DocumentList
43
44
  };
44
45
  //# sourceMappingURL=DocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;;AAoBO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,GAAM,OAAOC,EAAA,IAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAAE,MAAgB,CAACA,EAAa,eAAe;AAU3F,SACE,gBAAAd,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,eAAAH;AAAA,QACA,mBAAAC;AAAA,QACA,gBAVe,MAAM;AAC3B,UAAAN,EAAQS,EAAgB,mBAAmB;AAAA,QAC7C;AAAA,QASQ,yBAfwB,CAACP,MAAe;AAC9C,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM;AAAA,QACzE;AAAA,QAcQ,mBAAAC;AAAA,MAAA;AAAA,MAGD,UAAAL,KAGC,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
1
+ {"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;;;AAoBO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,GAAM,OAAOC,EAAA,IAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAAE,MAAgB,CAACA,EAAa,eAAe;AAU3F,SACE,gBAAAd,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,eAAAH;AAAA,QACA,mBAAAC;AAAA,QACA,gBAVe,MAAM;AAC3B,UAAAN,EAAQS,EAAgB,mBAAmB;AAAA,QAC7C;AAAA,QASQ,yBAfwB,CAACP,MAAe;AAC9C,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM;AAAA,QACzE;AAAA,QAcQ,mBAAAC;AAAA,MAAA;AAAA,MAGD,UAAAL,KAGC,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
@@ -3,9 +3,8 @@ import { useTranslation as m } from "react-i18next";
3
3
  import { useDocumentList as s } from "./useDocumentList.js";
4
4
  import { Flex as l } from "../../../Common/Flex/Flex.js";
5
5
  import "classnames";
6
- import "../../../../shared/constants.js";
7
6
  import { DocumentList as u } from "../../../Common/DocumentList/DocumentList.js";
8
- function f() {
7
+ function b() {
9
8
  const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
10
9
  return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
11
10
  u,
@@ -34,6 +33,6 @@ function f() {
34
33
  ) }) });
35
34
  }
36
35
  export {
37
- f as List
36
+ b as List
38
37
  };
39
38
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAA,GAChE,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC,EAAC,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAAAS,OAAS;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAAA;AAAA,MAE/B,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MAAA;AAAA,MAEpC,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA,GAErC,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAA,GAChE,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC,EAAC,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAAAS,OAAS;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAAA;AAAA,MAE/B,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MAAA;AAAA,MAEpC,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA,GAErC,EAAA,CACF;AAEJ;"}
@@ -11,11 +11,10 @@ import "../../../../shared/constants.js";
11
11
  import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [a, f] = t("DocumentListContext");
15
+ const [d, a] = t("DocumentListContext");
17
16
  export {
18
- f as DocumentListProvider,
19
- a as useDocumentList
17
+ a as DocumentListProvider,
18
+ d as useDocumentList
20
19
  };
21
20
  //# sourceMappingURL=useDocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -12,16 +12,17 @@ import { useBase as C } from "../../../Base/useBase.js";
12
12
  import { useI18n as G } from "../../../../i18n/I18n.js";
13
13
  import { componentEvents as i } from "../../../../shared/constants.js";
14
14
  import { Flex as M } from "../../../Common/Flex/Flex.js";
15
+ import "react-i18next";
15
16
  import "classnames";
16
17
  import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
17
- function W(r) {
18
+ function X(r) {
18
19
  return /* @__PURE__ */ o(A, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
19
20
  }
20
- function j({ employeeId: r, formId: s, className: u, children: t }) {
21
+ function j({ employeeId: r, formId: s, className: u, children: n }) {
21
22
  G("Employee.DocumentSigner");
22
- const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), n = c.form, {
23
+ const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), t = c.form, {
23
24
  data: { formPdf: f }
24
- } = h({ employeeId: r, formId: n.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
25
+ } = h({ employeeId: r, formId: t.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
25
26
  return /* @__PURE__ */ o("section", { className: u, children: /* @__PURE__ */ o(
26
27
  w,
27
28
  {
@@ -30,16 +31,16 @@ function j({ employeeId: r, formId: s, className: u, children: t }) {
30
31
  handleBack: () => {
31
32
  e(i.CANCEL);
32
33
  },
33
- form: n,
34
+ form: t,
34
35
  isPending: l
35
36
  },
36
37
  children: /* @__PURE__ */ o(R, { onSubmit: async (g) => {
37
38
  await a(g, async (m) => {
38
- if (n.uuid) {
39
+ if (t.uuid) {
39
40
  const { form: S } = await p({
40
41
  request: {
41
42
  employeeId: r,
42
- formId: n.uuid,
43
+ formId: t.uuid,
43
44
  requestBody: {
44
45
  signatureText: m.signature,
45
46
  agree: m.confirmSignature
@@ -49,7 +50,7 @@ function j({ employeeId: r, formId: s, className: u, children: t }) {
49
50
  e(i.EMPLOYEE_SIGN_FORM, S);
50
51
  }
51
52
  });
52
- }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: t || /* @__PURE__ */ F(E, { children: [
53
+ }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: n || /* @__PURE__ */ F(E, { children: [
53
54
  /* @__PURE__ */ o(v, {}),
54
55
  /* @__PURE__ */ o(B, {}),
55
56
  /* @__PURE__ */ o(b, {}),
@@ -59,6 +60,6 @@ function j({ employeeId: r, formId: s, className: u, children: t }) {
59
60
  ) });
60
61
  }
61
62
  export {
62
- W as SignatureForm
63
+ X as SignatureForm
63
64
  };
64
65
  //# sourceMappingURL=SignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":";;;;;;;;;;;;;;;;AAyBO,SAASA,EAAcC,GAAoD;AAChF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAAA;AAwBhE,SACE,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAAJ;AAAA,QACA,YA3BW,MAAM;AACvB,UAAAR,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QA0BQ,MAAAR;AAAA,QACA,WAAWK;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAlB,EAACsB,GAAA,EAAoB,UA5BN,OAAOX,MAA8B;AACxD,cAAMF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAA,IAAmB,MAAMP,EAAS;AAAA,cAC9C,SAAS;AAAA,gBACP,YAAAd;AAAA,gBACA,QAAQU,EAAK;AAAA,gBACb,aAAa;AAAA,kBACX,eAAeU,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,gBAAA;AAAA,cACjB;AAAA,YACF,CACD;AACD,YAAAf,EAAQa,EAAgB,oBAAoBG,CAAc;AAAA,UAC5D;AAAA,QACF,CAAC;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UAAAnB,KAGC,gBAAAoB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAQ;AAAA,0BACRC,GAAA,EAAc;AAAA,0BACdC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":";;;;;;;;;;;;;;;;;AAyBO,SAASA,EAAcC,GAAoD;AAChF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAAA;AAwBhE,SACE,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAAJ;AAAA,QACA,YA3BW,MAAM;AACvB,UAAAR,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QA0BQ,MAAAR;AAAA,QACA,WAAWK;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAlB,EAACsB,GAAA,EAAoB,UA5BN,OAAOX,MAA8B;AACxD,cAAMF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAA,IAAmB,MAAMP,EAAS;AAAA,cAC9C,SAAS;AAAA,gBACP,YAAAd;AAAA,gBACA,QAAQU,EAAK;AAAA,gBACb,aAAa;AAAA,kBACX,eAAeU,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,gBAAA;AAAA,cACjB;AAAA,YACF,CACD;AACD,YAAAf,EAAQa,EAAgB,oBAAoBG,CAAc;AAAA,UAC5D;AAAA,QACF,CAAC;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UAAAnB,KAGC,gBAAAoB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAQ;AAAA,0BACRC,GAAA,EAAc;AAAA,0BACdC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -11,11 +11,10 @@ import "../../../../shared/constants.js";
11
11
  import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [d, s] = o("SignatureFormContext");
15
+ const [c, d] = o("SignatureFormContext");
17
16
  export {
18
- s as SignatureFormProvider,
19
- d as useSignatureForm
17
+ d as SignatureFormProvider,
18
+ c as useSignatureForm
20
19
  };
21
20
  //# 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;"}