@gusto/embedded-react-sdk 0.13.3 → 0.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/assets/icons/hamburger.svg.js +5 -5
  3. package/dist/assets/icons/hamburger.svg.js.map +1 -1
  4. package/dist/assets/icons/receipt-check.svg.js +10 -0
  5. package/dist/assets/icons/receipt-check.svg.js.map +1 -0
  6. package/dist/components/Common/DataView/DataTable/DataTable.js +29 -28
  7. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  8. package/dist/components/Common/DocumentViewer/DocumentViewer.d.ts +1 -1
  9. package/dist/components/Common/DocumentViewer/DocumentViewer.js +9 -9
  10. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  11. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
  12. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  13. package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
  14. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  15. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  16. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +33 -31
  17. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  18. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +4 -0
  19. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  20. package/dist/components/Common/UI/Table/Table.js +22 -13
  21. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  22. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  23. package/dist/components/Common/UI/Table/TableTypes.d.ts +5 -0
  24. package/dist/components/Common/UI/Table/TableTypes.js +2 -1
  25. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  26. package/dist/components/Common/UI/Text/Text.module.scss.js +15 -14
  27. package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
  28. package/dist/components/Common/UI/Text/TextTypes.d.ts +2 -2
  29. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
  31. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
  33. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  35. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  36. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +2 -3
  37. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  38. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
  39. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  40. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  41. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  42. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
  43. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -11
  45. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  46. package/dist/components/Company/BankAccount/BankAccount.js +25 -21
  47. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  48. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  49. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
  50. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
  52. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  53. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
  54. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  55. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
  56. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  57. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  58. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  59. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +34 -35
  60. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  61. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -7
  62. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  63. package/dist/components/Company/FederalTaxes/Actions.js +6 -5
  64. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  65. package/dist/components/Company/FederalTaxes/FederalTaxes.js +12 -13
  66. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  67. package/dist/components/Company/FederalTaxes/Form.js +4 -3
  68. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  69. package/dist/components/Company/Industry/Actions.js +3 -2
  70. package/dist/components/Company/Industry/Actions.js.map +1 -1
  71. package/dist/components/Company/Industry/Edit.js +5 -4
  72. package/dist/components/Company/Industry/Edit.js.map +1 -1
  73. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  74. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  75. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  76. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  77. package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -11
  78. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  79. package/dist/components/Company/Locations/Locations.js +21 -17
  80. package/dist/components/Company/Locations/Locations.js.map +1 -1
  81. package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
  82. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  83. package/dist/components/Company/Locations/LocationsList/List.js +16 -16
  84. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  85. package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -7
  86. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  87. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +21 -17
  88. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  89. package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
  90. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  91. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
  92. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  93. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
  94. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  95. package/dist/components/Company/PaySchedule/PaySchedule.js +33 -34
  96. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  97. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -9
  98. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  99. package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
  100. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  101. package/dist/components/Company/PaySchedule/_parts/Head.js +7 -6
  102. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  103. package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
  104. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  105. package/dist/components/Company/StateTaxes/StateTaxes.js +20 -16
  106. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  107. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  108. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  109. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  110. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  111. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
  112. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  113. package/dist/components/Contractor/Address/Address.js +4 -5
  114. package/dist/components/Contractor/Address/Address.js.map +1 -1
  115. package/dist/components/Contractor/Address/Form.js +3 -4
  116. package/dist/components/Contractor/Address/Form.js.map +1 -1
  117. package/dist/components/Contractor/ContractorList/index.js +17 -17
  118. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +25 -21
  119. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  120. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -5
  121. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  122. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  123. package/dist/components/Contractor/Submit/Submit.js +1 -1
  124. package/dist/components/Employee/Compensation/Actions.js +1 -1
  125. package/dist/components/Employee/Compensation/Edit.js +12 -12
  126. package/dist/components/Employee/Compensation/List.js +23 -22
  127. package/dist/components/Employee/Compensation/List.js.map +1 -1
  128. package/dist/components/Employee/Deductions/DeductionsComponents.js +1 -1
  129. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
  130. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +55 -0
  131. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +221 -0
  132. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
  133. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
  134. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
  135. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +42 -0
  136. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +132 -0
  137. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
  138. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
  139. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
  140. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
  141. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +7 -0
  142. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +98 -0
  143. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +1 -0
  144. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  145. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +8 -8
  146. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
  147. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  148. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -8
  149. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  150. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  151. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  152. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +19 -15
  153. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  154. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +9 -10
  155. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  156. package/dist/components/Employee/EmployeeList/Actions.js +3 -2
  157. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  158. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  159. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  160. package/dist/components/Employee/EmployeeList/Head.js +6 -5
  161. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  162. package/dist/components/Employee/EmployeeList/List.js +12 -12
  163. package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
  164. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  165. package/dist/components/Employee/FederalTaxes/FederalForm.js +12 -11
  166. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  167. package/dist/components/Employee/Landing/Landing.js +8 -8
  168. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +24 -20
  169. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  170. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  171. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  172. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  173. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
  174. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -8
  175. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  176. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  177. package/dist/components/Employee/Profile/Actions.js +7 -6
  178. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  179. package/dist/components/Employee/Profile/HomeAddress.js +5 -6
  180. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  181. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
  182. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  183. package/dist/components/Employee/Profile/Profile.d.ts +1 -0
  184. package/dist/components/Employee/Profile/Profile.js +22 -22
  185. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  186. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +17 -13
  187. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
  188. package/dist/components/Employee/StateTaxes/Actions.js +8 -7
  189. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  190. package/dist/components/Employee/Taxes/Actions.js +9 -8
  191. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  192. package/dist/components/Employee/Taxes/FederalForm.js +13 -12
  193. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  194. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.d.ts +7 -0
  195. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerList.d.ts +6 -0
  196. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerTypes.d.ts +101 -0
  197. package/dist/components/Payroll/PayrollBlocker/index.d.ts +4 -0
  198. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +64 -56
  199. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  200. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +2 -3
  201. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  202. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +65 -66
  203. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  204. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
  205. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  206. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +2 -0
  207. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +26 -0
  208. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -0
  209. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +25 -0
  210. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +59 -0
  211. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -0
  212. package/dist/components/Payroll/PayrollFlow/index.d.ts +3 -0
  213. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +7 -0
  214. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +116 -0
  215. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -0
  216. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
  217. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  218. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +7 -6
  219. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  220. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +3 -1
  221. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +60 -52
  222. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  223. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -1
  224. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +97 -96
  225. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  226. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +7 -0
  227. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +21 -0
  228. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -0
  229. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +220 -0
  230. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -0
  231. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +28 -0
  232. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -0
  233. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +46 -37
  234. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
  235. package/dist/components/Payroll/index.d.ts +2 -0
  236. package/dist/components/Payroll/index.js +12 -8
  237. package/dist/components/Payroll/index.js.map +1 -1
  238. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  239. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  240. package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
  241. package/dist/contexts/ThemeProvider/theme.js +2 -1
  242. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  243. package/dist/i18n/I18n.js +1 -1
  244. package/dist/i18n/I18n.js.map +1 -1
  245. package/dist/i18n/en/Employee.Deductions.json.js +126 -66
  246. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  247. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +15 -15
  248. package/dist/i18n/en/Payroll.PayrollOverview.json.js +8 -8
  249. package/dist/i18n/en/PayrollBlocker.json.js +18 -0
  250. package/dist/i18n/en/PayrollBlocker.json.js.map +1 -0
  251. package/dist/shared/constants.d.ts +12 -4
  252. package/dist/shared/constants.js +37 -33
  253. package/dist/shared/constants.js.map +1 -1
  254. package/dist/style.css +1 -1
  255. package/dist/types/i18next.d.ts +40 -2
  256. package/package.json +8 -8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UNSTABLE_DeductionsForm.js","sources":["../../../../../src/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useState } from 'react'\nimport { useGarnishmentsListSuspense } from '@gusto/embedded-api/react-query/garnishmentsList'\nimport { useGarnishmentsGetChildSupportDataSuspense } from '@gusto/embedded-api/react-query/garnishmentsGetChildSupportData'\nimport styles from './DeductionsForm.module.scss'\nimport ChildSupportForm from './ChildSupportForm'\nimport CustomDeductionForm from './CustomDeductionForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n useBase,\n} from '@/components/Base'\nimport { Grid } from '@/components/Common/Grid/Grid'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport CaretLeft from '@/assets/icons/caret-left.svg?react'\ninterface DeductionsFormProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n deductionId?: string | null\n}\n\nexport function UNSTABLEDeductionsForm(props: DeductionsFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\n// deductions can be either custom or a garnishment\n// we currently only support child support garnishment type\nconst SUPPORTED_GARNISHMENT_TYPES = ['child_support']\n\nfunction Root({ className, employeeId, deductionId, dictionary }: DeductionsFormProps) {\n const { onEvent } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n // Fetch all garnishments to find the specific one by ID\n const { data } = useGarnishmentsListSuspense({ employeeId })\n\n // Fetch child support garnishment metadata\n const { data: childSupportData } = useGarnishmentsGetChildSupportDataSuspense({})\n\n // find existing deduction to determine if in ADD or EDIT mode\n // if deduction exists we are editing, else we are adding\n // edit deductions cannot change the record type, it can only update the existing entries of the record\n const deduction = deductionId\n ? (data.garnishmentList?.find(g => g.uuid === deductionId) ?? null)\n : null\n const title = !deduction ? t('addDeductionTitle') : t('editDeductionTitle')\n const deductionType = deduction?.garnishmentType\n const stateAgencies =\n childSupportData.childSupportData?.agencies?.map(a => ({\n label: a.name as string,\n value: a.state as string,\n })) || []\n\n // if deduction exists check if it has a type, else if does not exist default to garnishment\n const [isGarnishment, setIsGarnishment] = useState<boolean>(\n (deductionType && SUPPORTED_GARNISHMENT_TYPES.includes(deductionType)) || !deduction,\n )\n const defaultDeductionTypeSelection = deduction\n ? deductionType\n ? 'garnishment'\n : 'custom'\n : 'garnishment'\n\n // filter out specific fipsCodes/counties as mapped to selected state agency\n // some states only have 1 fips code/county to cover the entire state,\n // but the API will return a null label so we need to provide a default label\n const [stateAgency, setStateAgency] = useState<string>(deduction?.childSupport?.state || '')\n const handleStateAgencySelect = (stateAgency: string) => {\n setStateAgency(stateAgency)\n }\n const counties =\n childSupportData.childSupportData?.agencies\n ?.find(agency => agency.state === stateAgency)\n ?.fipsCodes?.map(fipsCode => ({\n label: fipsCode.county?.length ? fipsCode.county : t('allCounties'),\n value: fipsCode.code as string,\n })) || []\n\n // get a reference to the currently selected agency to determine which required fields to display/include in submission\n const selectedAgency = childSupportData.childSupportData?.agencies?.find(\n agency => agency.state === stateAgency,\n )\n\n const handleCancel = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_CANCEL)\n }\n\n const handleSelectDeductionType = (selection: string) => {\n setIsGarnishment(selection === 'garnishment')\n }\n\n return (\n <section className={className}>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n <CaretLeft className={styles.leftCaretIcon} />\n {t('backToDeductionsCta')}\n </Components.Button>\n <Grid gap={16} className={styles.formHeadingContainer}>\n <Components.Heading as=\"h2\">{title}</Components.Heading>\n <section>\n <Components.Text weight=\"bold\">{t('externalPostTaxDeductions')}</Components.Text>\n <Components.Text variant=\"supporting\">\n {t('externalPostTaxDeductionsDescription')}\n </Components.Text>\n </section>\n <Components.RadioGroup\n label={t('deductionTypeLabel')}\n description={t('deductionTypeRadioLabel')}\n options={[\n { value: 'garnishment', label: t('garnishmentOption') },\n { value: 'custom', label: t('customDeductionOption') },\n ]}\n defaultValue={defaultDeductionTypeSelection}\n onChange={handleSelectDeductionType}\n isRequired\n isDisabled={!!deduction}\n className={styles.deductionTypeRadioGroup}\n />\n {isGarnishment && (\n <section>\n <Components.Text weight=\"bold\" className={styles.garnishmentTypeLabel}>\n {t('garnishmentType')}\n </Components.Text>\n {/* we currently only support child support garnishment type */}\n <Components.Select\n label={t('garnishmentType')}\n options={[]}\n placeholder={t('childSupport')}\n shouldVisuallyHideLabel\n isDisabled\n />\n </section>\n )}\n <hr />\n </Grid>\n\n {isGarnishment ? (\n <ChildSupportForm\n deduction={deduction}\n employeeId={employeeId}\n handleStateAgencySelect={handleStateAgencySelect}\n stateAgencies={stateAgencies}\n counties={counties}\n selectedAgency={selectedAgency}\n />\n ) : (\n <CustomDeductionForm deduction={deduction} employeeId={employeeId} />\n )}\n </section>\n )\n}\n"],"names":["UNSTABLEDeductionsForm","props","jsx","BaseComponent","Root","SUPPORTED_GARNISHMENT_TYPES","className","employeeId","deductionId","dictionary","onEvent","useBase","useTranslation","Components","useComponentContext","useComponentDictionary","useI18n","data","useGarnishmentsListSuspense","childSupportData","useGarnishmentsGetChildSupportDataSuspense","deduction","g","title","deductionType","stateAgencies","a","isGarnishment","setIsGarnishment","useState","defaultDeductionTypeSelection","stateAgency","setStateAgency","handleStateAgencySelect","counties","agency","fipsCode","selectedAgency","handleCancel","componentEvents","handleSelectDeductionType","selection","jsxs","CaretLeft","styles","Grid","ChildSupportForm","CustomDeductionForm"],"mappings":";;;;;;;;;;;;;;;AAwBO,SAASA,GAAuBC,GAAqD;AAC1F,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAIA,MAAMI,IAA8B,CAAC,eAAe;AAEpD,SAASD,EAAK,EAAE,WAAAE,GAAW,YAAAC,GAAY,aAAAC,GAAa,YAAAC,KAAmC;AACrF,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACd,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA;AAEnB,EAAAC,EAAuB,uBAAuBN,CAAU,GACxDO,EAAQ,qBAAqB;AAG7B,QAAM,EAAE,MAAAC,EAAA,IAASC,EAA4B,EAAE,YAAAX,GAAY,GAGrD,EAAE,MAAMY,MAAqBC,EAA2C,CAAA,CAAE,GAK1EC,IAAYb,IACbS,EAAK,iBAAiB,KAAK,OAAKK,EAAE,SAASd,CAAW,KAAK,OAC5D,MACEe,IAA8C,EAArCF,IAAuC,uBAAzB,mBAA6C,GACpEG,IAAgBH,GAAW,iBAC3BI,IACJN,EAAiB,kBAAkB,UAAU,IAAI,CAAAO,OAAM;AAAA,IACrD,OAAOA,EAAE;AAAA,IACT,OAAOA,EAAE;AAAA,EAAA,EACT,KAAK,C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 +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";
9
10
  import { ActionsLayout as I } from "../../../Common/ActionsLayout/ActionsLayout.js";
10
11
  import u from "../../../Common/hooks/useNumberFormatter.js";
11
12
  import M from "../../../../assets/icons/pencil.svg.js";
12
13
  import U from "../../../../assets/icons/trashcan.svg.js";
13
14
  import { HamburgerMenu as B } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
14
15
  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";
12
10
  import { componentEvents as s } from "../../../../shared/constants.js";
13
- import { useComponentContext as Y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import { RadioGroupField as y } from "../../../Common/Fields/RadioGroupField/RadioGroupField.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";
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
- F("Employee.Deductions", u), I("Employee.Deductions");
20
+ const { onEvent: i } = b(), { t: o } = D("Employee.Deductions"), r = y();
21
+ I("Employee.Deductions", u), Y("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
- y,
31
+ v,
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(v, { children: /* @__PURE__ */ e(r.Button, { type: "submit", children: o("continueCta") }) })
43
+ /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(r.Button, { type: "submit", children: o("continueCta") }) })
44
44
  ] }) }) }) });
45
45
  }
46
46
  export {
@@ -1,14 +1,15 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
- import { useDocumentList as s } from "./useDocumentList.js";
3
+ import { useDocumentList as m } from "./useDocumentList.js";
4
4
  import "classnames";
5
- import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import "../../../../shared/constants.js";
6
+ import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
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") }) });
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") }) });
10
11
  }
11
12
  export {
12
- C as Actions
13
+ h as Actions
13
14
  };
14
15
  //# 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","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;"}
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;"}
@@ -9,14 +9,13 @@ 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";
13
12
  import "classnames";
14
- function N(e) {
13
+ function B(e) {
15
14
  return /* @__PURE__ */ o(F, { ...e, children: /* @__PURE__ */ o(O, { ...e }) });
16
15
  }
17
- function O({ employeeId: e, className: s, children: t }) {
16
+ function O({ employeeId: e, className: s, children: n }) {
18
17
  S("Employee.DocumentSigner");
19
- const { onEvent: n } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, p = i.every((r) => !r.requiresSigning);
18
+ const { onEvent: t } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, p = i.every((r) => !r.requiresSigning);
20
19
  return /* @__PURE__ */ o("section", { className: s, children: /* @__PURE__ */ o(
21
20
  h,
22
21
  {
@@ -24,14 +23,14 @@ function O({ employeeId: e, className: s, children: t }) {
24
23
  employeeForms: i,
25
24
  hasSignedAllForms: p,
26
25
  handleContinue: () => {
27
- n(m.EMPLOYEE_FORMS_DONE);
26
+ t(m.EMPLOYEE_FORMS_DONE);
28
27
  },
29
28
  handleRequestFormToSign: (r) => {
30
- n(m.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: r.uuid });
29
+ t(m.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: r.uuid });
31
30
  },
32
31
  documentListError: c
33
32
  },
34
- children: t || /* @__PURE__ */ l(g, { flexDirection: "column", children: [
33
+ children: n || /* @__PURE__ */ l(g, { flexDirection: "column", children: [
35
34
  /* @__PURE__ */ o(d, {}),
36
35
  /* @__PURE__ */ o(E, {}),
37
36
  /* @__PURE__ */ o(a, {})
@@ -40,6 +39,6 @@ function O({ employeeId: e, className: s, children: t }) {
40
39
  ) });
41
40
  }
42
41
  export {
43
- N as DocumentList
42
+ B as DocumentList
44
43
  };
45
44
  //# 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,8 +3,9 @@ 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";
6
7
  import { DocumentList as u } from "../../../Common/DocumentList/DocumentList.js";
7
- function b() {
8
+ function f() {
8
9
  const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
9
10
  return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
10
11
  u,
@@ -33,6 +34,6 @@ function b() {
33
34
  ) }) });
34
35
  }
35
36
  export {
36
- b as List
37
+ f as List
37
38
  };
38
39
  //# 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;"}
@@ -1,21 +1,25 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import { createMachine as i } from "robot3";
3
- import { DocumentListContextual as c } from "./documentSignerStateMachine.js";
4
- import { documentSignerMachine as p } from "./stateMachine.js";
5
- import { Flow as u } from "../../Flow/Flow.js";
3
+ import { useMemo as c } from "react";
4
+ import { DocumentListContextual as p } from "./documentSignerStateMachine.js";
5
+ import { documentSignerMachine as u } from "./stateMachine.js";
6
+ import { Flow as f } from "../../Flow/Flow.js";
6
7
  import { useComponentDictionary as a } from "../../../i18n/I18n.js";
7
- const d = ({ employeeId: o, onEvent: e, dictionary: n }) => {
8
- a("Employee.DocumentSigner", n);
9
- const t = i(
10
- "index",
11
- p,
12
- (m) => ({
13
- ...m,
14
- component: c,
15
- employeeId: o
16
- })
8
+ const d = ({ employeeId: o, onEvent: m, dictionary: r }) => {
9
+ a("Employee.DocumentSigner", r);
10
+ const t = c(
11
+ () => i(
12
+ "index",
13
+ u,
14
+ (e) => ({
15
+ ...e,
16
+ component: p,
17
+ employeeId: o
18
+ })
19
+ ),
20
+ [o]
17
21
  );
18
- return /* @__PURE__ */ r(u, { machine: t, onEvent: e });
22
+ return /* @__PURE__ */ n(f, { machine: t, onEvent: m });
19
23
  };
20
24
  export {
21
25
  d as DocumentSigner
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Employee/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport {\n DocumentListContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n employeeId: string\n}\n\nexport const DocumentSigner = ({ employeeId, onEvent, dictionary }: DocumentSignerProps) => {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const documentSigner = createMachine(\n 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: DocumentListContextual,\n employeeId,\n }),\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","employeeId","onEvent","dictionary","useComponentDictionary","documentSigner","createMachine","documentSignerMachine","initialContext","DocumentListContextual","jsx","Flow"],"mappings":";;;;;;AAcO,MAAMA,IAAiB,CAAC,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,QAAsC;AAC1F,EAAAC,EAAuB,2BAA2BD,CAAU;AAE5D,QAAME,IAAiBC;AAAA,IACrB;AAAA,IACAC;AAAA,IACA,CAACC,OAAoD;AAAA,MACnD,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAR;AAAA,IAAA;AAAA,EACF;AAEF,SAAO,gBAAAS,EAACC,GAAA,EAAK,SAASN,GAAgB,SAAAH,EAAA,CAAkB;AAC1D;"}
1
+ {"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Employee/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport {\n DocumentListContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n employeeId: string\n}\n\nexport const DocumentSigner = ({ employeeId, onEvent, dictionary }: DocumentSignerProps) => {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const documentSigner = useMemo(\n () =>\n createMachine(\n 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: DocumentListContextual,\n employeeId,\n }),\n ),\n [employeeId],\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","employeeId","onEvent","dictionary","useComponentDictionary","documentSigner","useMemo","createMachine","documentSignerMachine","initialContext","DocumentListContextual","jsx","Flow"],"mappings":";;;;;;;AAeO,MAAMA,IAAiB,CAAC,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,QAAsC;AAC1F,EAAAC,EAAuB,2BAA2BD,CAAU;AAE5D,QAAME,IAAiBC;AAAA,IACrB,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,YAAAT;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACA,CAAU;AAAA,EAAA;AAEb,SAAO,gBAAAU,EAACC,GAAA,EAAK,SAASP,GAAgB,SAAAH,EAAA,CAAkB;AAC1D;"}
@@ -12,17 +12,16 @@ 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";
16
15
  import "classnames";
17
16
  import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
18
- function X(r) {
17
+ function W(r) {
19
18
  return /* @__PURE__ */ o(A, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
20
19
  }
21
- function j({ employeeId: r, formId: s, className: u, children: n }) {
20
+ function j({ employeeId: r, formId: s, className: u, children: t }) {
22
21
  G("Employee.DocumentSigner");
23
- const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), t = c.form, {
22
+ const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), n = c.form, {
24
23
  data: { formPdf: f }
25
- } = h({ employeeId: r, formId: t.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
24
+ } = h({ employeeId: r, formId: n.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
26
25
  return /* @__PURE__ */ o("section", { className: u, children: /* @__PURE__ */ o(
27
26
  w,
28
27
  {
@@ -31,16 +30,16 @@ function j({ employeeId: r, formId: s, className: u, children: n }) {
31
30
  handleBack: () => {
32
31
  e(i.CANCEL);
33
32
  },
34
- form: t,
33
+ form: n,
35
34
  isPending: l
36
35
  },
37
36
  children: /* @__PURE__ */ o(R, { onSubmit: async (g) => {
38
37
  await a(g, async (m) => {
39
- if (t.uuid) {
38
+ if (n.uuid) {
40
39
  const { form: S } = await p({
41
40
  request: {
42
41
  employeeId: r,
43
- formId: t.uuid,
42
+ formId: n.uuid,
44
43
  requestBody: {
45
44
  signatureText: m.signature,
46
45
  agree: m.confirmSignature
@@ -50,7 +49,7 @@ function j({ employeeId: r, formId: s, className: u, children: n }) {
50
49
  e(i.EMPLOYEE_SIGN_FORM, S);
51
50
  }
52
51
  });
53
- }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: n || /* @__PURE__ */ F(E, { children: [
52
+ }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: t || /* @__PURE__ */ F(E, { children: [
54
53
  /* @__PURE__ */ o(v, {}),
55
54
  /* @__PURE__ */ o(B, {}),
56
55
  /* @__PURE__ */ o(b, {}),
@@ -60,6 +59,6 @@ function j({ employeeId: r, formId: s, className: u, children: n }) {
60
59
  ) });
61
60
  }
62
61
  export {
63
- X as SignatureForm
62
+ W as SignatureForm
64
63
  };
65
64
  //# 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,GAE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;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;"}
@@ -2,13 +2,14 @@ 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
4
  import "classnames";
5
+ import "../../../shared/constants.js";
5
6
  import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function C() {
8
+ function d() {
8
9
  const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = p();
9
10
  return e.length === 0 ? null : /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { onClick: n, isLoading: !1, children: t("continueCta") }) });
10
11
  }
11
12
  export {
12
- C as Actions
13
+ d as Actions
13
14
  };
14
15
  //# 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,EAAA,IAAcC,EAAA,GAC5BC,IAAaC,EAAA;AAEnB,SAAIH,EAAU,WAAW,IAChB,OAIP,gBAAAI,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAA,EAAE,aAAa,GAClB,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,EAAA,IAAcC,EAAA,GAC5BC,IAAaC,EAAA;AAEnB,SAAIH,EAAU,WAAW,IAChB,OAIP,gBAAAI,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
@@ -9,9 +9,10 @@ import { Actions as k } from "./Actions.js";
9
9
  import { BaseComponent as q } from "../../Base/Base.js";
10
10
  import { useBase as j } from "../../Base/useBase.js";
11
11
  import { Flex as H } from "../../Common/Flex/Flex.js";
12
+ import "classnames";
13
+ import { componentEvents as s, EmployeeOnboardingStatus as E } from "../../../shared/constants.js";
12
14
  import { Loading as V } from "../../Common/Loading/Loading.js";
13
15
  import { useI18n as z, useComponentDictionary as J } from "../../../i18n/I18n.js";
14
- import { componentEvents as s, EmployeeOnboardingStatus as E } from "../../../shared/constants.js";
15
16
  import { Head as K } from "./Head.js";
16
17
  import { List as Q } from "./List.js";
17
18
  import { useFlow as X } from "../../Flow/useFlow.js";
@@ -105,12 +106,12 @@ function $({ companyId: n, className: m, children: l, dictionary: h }) {
105
106
  }
106
107
  ) });
107
108
  }
108
- const Oe = () => {
109
+ const De = () => {
109
110
  const { companyId: n, onEvent: m } = X();
110
111
  return /* @__PURE__ */ o(Z, { companyId: n, onEvent: m });
111
112
  };
112
113
  export {
113
114
  Z as EmployeeList,
114
- Oe as EmployeeListContextual
115
+ De as EmployeeListContextual
115
116
  };
116
117
  //# sourceMappingURL=EmployeeList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport { keepPreviousData } from '@tanstack/react-query'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex, Loading } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const { data, fetchStatus, isFetching } = useEmployeesList(\n {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n },\n { placeholderData: keepPreviousData },\n )\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n if (fetchStatus === 'fetching' && !data) {\n return <Loading />\n }\n const { httpMeta, showEmployees: employeeList } = data!\n const employees = employeeList!\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\n const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n isFetching,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":";;;;;;;;;;;;;;;;;AA2BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAE/E,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAE1D,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C,EAAE,MAAAG,GAAM,aAAAC,GAAa,YAAAC,EAAA,IAAeC;AAAA,IACxC;AAAA,MACE,WAAAjB;AAAA,MACA,MAAMS;AAAA,MACN,KAAKG;AAAA,IAAA;AAAA,IAEP,EAAE,iBAAiBM,EAAA;AAAA,EAAiB,GAGhC,EAAE,aAAaC,EAAA,IAA2BC,EAAA,GAC1C,EAAE,aAAaC,EAAA,IACnBC,EAAA;AAEF,MAAIP,MAAgB,cAAc,CAACD;AACjC,6BAAQS,GAAA,EAAQ;AAElB,QAAM,EAAE,UAAAC,GAAU,eAAeC,EAAA,IAAiBX,GAC5CY,IAAYD,GAEZE,IAAa,OAAOH,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC,GAEvEI,IAA2B,CAACC,MAAqB;AACrD,IAAAhB,EAAgBgB,CAAQ;AAAA,EAC1B,GACMC,IAAkB,MAAM;AAC5B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H,MAAAtC,EAAQgC,EAAgB,oCAAoCO,CAAY;AAAA,IAC1E,CAAC;AAAA,EACH;AAWA,SACE,gBAAAhD,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACiD;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,YAPW,CAACV,GAAcW,MAAwC;AACxE,UAAAzC,EAAQgC,EAAgB,iBAAiB,EAAE,YAAYF,GAAM,kBAAAW,GAAkB;AAAA,QACjF;AAAA,QAMQ,WAfU,MAAM;AACtB,UAAAzC,EAAQgC,EAAgB,eAAe;AAAA,QACzC;AAAA,QAcQ,cAAAC;AAAA,QACA,cAAAJ;AAAA,QACA,WAAAT;AAAA,QACA,aAAAjB;AAAA,QACA,YAAAkB;AAAA,QACA,iBAAAG;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAE;AAAA,QACA,gBAAAC;AAAA,QACA,4BAAAS;AAAA,QACA,0BAAAf;AAAA,QACA,YAxBW,MAAM;AACvB,UAAAtB,EAAQgC,EAAgB,wBAAwB;AAAA,QAClD;AAAA,QAuBQ,YAAAtB;AAAA,MAAA;AAAA,MAGD,UAAAd,KAGC,gBAAA8C,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAApD,EAACqD,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAKO,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAArD,GAAW,SAAAM,EAAA,IAAYgD,EAAA;AAC/B,SAAO,gBAAAzD,EAACF,GAAA,EAAa,WAAAK,GAAsB,SAAAM,EAAA,CAAkB;AAC/D;"}
1
+ {"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport { keepPreviousData } from '@tanstack/react-query'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex, Loading } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const { data, fetchStatus, isFetching } = useEmployeesList(\n {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n },\n { placeholderData: keepPreviousData },\n )\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n if (fetchStatus === 'fetching' && !data) {\n return <Loading />\n }\n const { httpMeta, showEmployees: employeeList } = data!\n const employees = employeeList!\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\n const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n isFetching,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":";;;;;;;;;;;;;;;;;;AA2BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,U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AAA,QAMQ,WAfU,MAAM;AACtB,UAAAzC,EAAQgC,EAAgB,eAAe;AAAA,QACzC;AAAA,QAcQ,cAAAC;AAAA,QACA,cAAAJ;AAAA,QACA,WAAAT;AAAA,QACA,aAAAjB;AAAA,QACA,YAAAkB;AAAA,QACA,iBAAAG;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAE;AAAA,QACA,gBAAAC;AAAA,QACA,4BAAAS;AAAA,QACA,0BAAAf;AAAA,QACA,YAxBW,MAAM;AACvB,UAAAtB,EAAQgC,EAAgB,wBAAwB;AAAA,QAClD;AAAA,QAuBQ,YAAAtB;AAAA,MAAA;AAAA,MAGD,UAAAd,KAGC,gBAAA8C,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAApD,EAACqD,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAKO,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAArD,GAAW,SAAAM,EAAA,IAAYgD,EAAA;AAC/B,SAAO,gBAAAzD,EAACF,GAAA,EAAa,WAAAK,GAAsB,SAAAM,EAAA,CAAkB;AAC/D;"}
@@ -1,13 +1,14 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as t } 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
4
  import "classnames";
5
+ import "../../../shared/constants.js";
5
6
  import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
- const c = () => {
7
- const { t } = n("Employee.EmployeeList"), o = m();
8
- return /* @__PURE__ */ e(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ e(o.Heading, { as: "h2", children: t("title") }) });
7
+ const f = () => {
8
+ const { t: e } = n("Employee.EmployeeList"), o = m();
9
+ return /* @__PURE__ */ t(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ t(o.Heading, { as: "h2", children: e("title") }) });
9
10
  };
10
11
  export {
11
- c as Head
12
+ f as Head
12
13
  };
13
14
  //# 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,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA,gBAAAD,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,OAAO,GAAE,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","t","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":";;;;;;AAKO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA,gBAAAD,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,OAAO,GAAE,GAC1C;AAEJ;"}
@@ -4,14 +4,14 @@ import { useState as k } from "react";
4
4
  import w from "./List.module.scss.js";
5
5
  import { useEmployeeList as B } from "./useEmployeeList.js";
6
6
  import "classnames";
7
- import { EmptyData as M } from "../../Common/EmptyData/EmptyData.js";
7
+ import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as M } from "../../../shared/constants.js";
8
+ import { EmptyData as y } from "../../Common/EmptyData/EmptyData.js";
8
9
  import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
9
- import { useComponentContext as y } from "../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import { HamburgerMenu as G } from "../../Common/HamburgerMenu/HamburgerMenu.js";
11
- import { EmployeeOnboardingStatusBadge as R } from "../../Common/OnboardingStatusBadge/index.js";
10
+ import { useComponentContext as G } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ import { HamburgerMenu as R } from "../../Common/HamburgerMenu/HamburgerMenu.js";
12
+ import { EmployeeOnboardingStatusBadge as F } from "../../Common/OnboardingStatusBadge/index.js";
12
13
  import s from "../../../assets/icons/pencil.svg.js";
13
- import F from "../../../assets/icons/trashcan.svg.js";
14
- import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as x } from "../../../shared/constants.js";
14
+ import x from "../../../assets/icons/trashcan.svg.js";
15
15
  import { firstLastName as V } from "../../../helpers/formattedStrings.js";
16
16
  import { useDataView as j } from "../../Common/DataView/useDataView.js";
17
17
  import { DataView as W } from "../../Common/DataView/DataView.js";
@@ -32,7 +32,7 @@ const ot = () => {
32
32
  totalPages: _,
33
33
  handleSkip: D,
34
34
  isFetching: I
35
- } = B(), r = y(), { t: a } = T("Employee.EmployeeList"), [P, u] = k(/* @__PURE__ */ new Set()), { ...v } = j({
35
+ } = B(), r = G(), { t: a } = T("Employee.EmployeeList"), [P, u] = k(/* @__PURE__ */ new Set()), { ...v } = j({
36
36
  data: d,
37
37
  columns: [
38
38
  {
@@ -47,7 +47,7 @@ const ot = () => {
47
47
  key: "status",
48
48
  title: a("statusLabel"),
49
49
  render: ({ onboarded: t, onboardingStatus: n }) => /* @__PURE__ */ e(
50
- R,
50
+ F,
51
51
  {
52
52
  onboarded: t,
53
53
  onboardingStatus: n
@@ -63,7 +63,7 @@ const ot = () => {
63
63
  p(t.uuid, t.onboardingStatus ?? void 0);
64
64
  },
65
65
  icon: /* @__PURE__ */ e(s, { "aria-hidden": !0 })
66
- }), x.has(t.onboarding_status ?? "") && n.push({
66
+ }), M.has(t.onboarding_status ?? "") && n.push({
67
67
  label: a("cancelSelfOnboardingCta"),
68
68
  onClick: async () => {
69
69
  await b(t.uuid);
@@ -85,9 +85,9 @@ const ot = () => {
85
85
  });
86
86
  });
87
87
  },
88
- icon: /* @__PURE__ */ e(F, { "aria-hidden": !0 })
88
+ icon: /* @__PURE__ */ e(x, { "aria-hidden": !0 })
89
89
  }), /* @__PURE__ */ e(
90
- G,
90
+ R,
91
91
  {
92
92
  items: n,
93
93
  triggerLabel: a("hamburgerTitle"),
@@ -105,7 +105,7 @@ const ot = () => {
105
105
  currentPage: O,
106
106
  totalPages: _
107
107
  },
108
- emptyState: () => /* @__PURE__ */ e(M, { title: a("emptyTableTitle"), description: a("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
108
+ emptyState: () => /* @__PURE__ */ e(y, { title: a("emptyTableTitle"), description: a("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
109
109
  /* @__PURE__ */ e(r.Button, { variant: "secondary", onClick: D, children: a("skipCta") }),
110
110
  /* @__PURE__ */ e(r.Button, { variant: "primary", onClick: l, children: a("addEmployeeCTA") })
111
111
  ] }) })
@@ -2,13 +2,14 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
3
  import { useFederalTaxes as i } from "./useFederalTaxes.js";
4
4
  import "classnames";
5
- import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
6
- import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function l() {
8
- const { t } = r("Employee.FederalTaxes"), { isPending: n } = i(), e = m();
9
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
5
+ import "../../../shared/constants.js";
6
+ import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
7
+ import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ function x() {
9
+ const { t } = r("Employee.FederalTaxes"), { isPending: n } = i(), e = s();
10
+ return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
10
11
  }
11
12
  export {
12
- l as Actions
13
+ x as Actions
13
14
  };
14
15
  //# sourceMappingURL=Actions.js.map