@gusto/embedded-react-sdk 0.31.0-rc.3 → 0.31.0-rc.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 (64) hide show
  1. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  2. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  3. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  4. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  5. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  6. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  7. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  8. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  9. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  10. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  11. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  12. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  13. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
  14. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  15. package/dist/components/Company/Industry/Context.js +6 -7
  16. package/dist/components/Company/Industry/Context.js.map +1 -1
  17. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  18. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  19. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  20. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  21. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  22. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  23. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  24. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  25. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  26. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  27. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  28. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  29. package/dist/components/Contractor/Address/useAddress.js +5 -6
  30. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  31. package/dist/components/Contractor/Profile/useContractorProfile.js +25 -26
  32. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  33. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -3
  34. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  35. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -3
  36. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  37. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -3
  38. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  39. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  40. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  41. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +25 -43
  42. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  43. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +42 -58
  44. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  45. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  46. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  47. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js +25 -31
  48. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  49. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  50. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  51. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  52. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  53. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  54. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  55. package/dist/components/Employee/Profile/useProfile.js +3 -4
  56. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  57. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  58. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  59. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  60. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  61. package/dist/components/Payroll/usePreparedPayrollData.js +5 -6
  62. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  63. package/dist/style.css +1 -1
  64. package/package.json +1 -1
@@ -1,51 +1,33 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { createMachine as d } from "robot3";
3
- import { useMemo as g } from "react";
4
- import { useIsMutating as b } from "@tanstack/react-query";
5
- import { APIError as y } from "@gusto/embedded-api/models/errors/apierror";
6
- import { useI9VerificationGetAuthorization as D } from "@gusto/embedded-api/react-query/i9VerificationGetAuthorization";
7
- import { mutationKeyI9VerificationUpdate as h } from "@gusto/embedded-api/react-query/i9VerificationUpdate";
8
- import { useEmployeesGet as L } from "@gusto/embedded-api/react-query/employeesGet";
9
- import { EmploymentEligibilityContextual as M, DocumentListContextual as S } from "./documentSignerStateMachine.js";
10
- import { documentSignerMachine as x } from "./stateMachine.js";
11
- import { Flow as A } from "../../Flow/Flow.js";
12
- import { BaseComponent as C } from "../../Base/Base.js";
13
- import { useBase as E } from "../../Base/useBase.js";
14
- import { useComponentDictionary as F } from "../../../i18n/I18n.js";
15
- function v(t) {
16
- return /* @__PURE__ */ i(C, { ...t, children: /* @__PURE__ */ i(O, { ...t }) });
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { createMachine as c } from "robot3";
3
+ import { useMemo as f } from "react";
4
+ import { DocumentListContextual as s } from "./documentSignerStateMachine.js";
5
+ import { documentSignerMachine as u } from "./stateMachine.js";
6
+ import { Flow as a } from "../../Flow/Flow.js";
7
+ import { BaseComponent as p } from "../../Base/Base.js";
8
+ import { useBase as d } from "../../Base/useBase.js";
9
+ import { useComponentDictionary as l } from "../../../i18n/I18n.js";
10
+ function R(o) {
11
+ return /* @__PURE__ */ e(p, { ...o, children: /* @__PURE__ */ e(x, { ...o }) });
17
12
  }
18
- function O({ employeeId: t, onEvent: m, dictionary: a, withEmployeeI9: o = !1 }) {
19
- F("Employee.DocumentSigner", a);
20
- const { LoadingIndicator: s } = E(), { data: u, isLoading: c } = L(
21
- { employeeId: t },
22
- { enabled: o }
23
- ), r = u?.employee?.onboardingDocumentsConfig?.i9Document === !0, { data: f, isLoading: p } = D(
24
- { employeeId: t },
25
- {
26
- enabled: o && r,
27
- retry: !1,
28
- refetchOnMount: !1,
29
- refetchOnWindowFocus: !1,
30
- staleTime: 1 / 0,
31
- throwOnError: (n) => !(n instanceof y && n.httpMeta.response.status === 404)
32
- }
33
- ), e = o && r && !f?.i9Authorization?.employeeSigned, l = g(
34
- () => d(
35
- e ? "employmentEligibility" : "index",
36
- x,
37
- (n) => ({
38
- ...n,
39
- component: e ? M : S,
40
- employeeId: t,
41
- withEmployeeI9: o
13
+ function x({ employeeId: o, onEvent: r, dictionary: m, withEmployeeI9: n = !1 }) {
14
+ l("Employee.DocumentSigner", m), d();
15
+ const t = f(
16
+ () => c(
17
+ "index",
18
+ u,
19
+ (i) => ({
20
+ ...i,
21
+ component: s,
22
+ employeeId: o,
23
+ withEmployeeI9: n
42
24
  })
43
25
  ),
44
- [t, e, o]
26
+ [o, !1, n]
45
27
  );
46
- return !(b({ mutationKey: h() }) > 0) && o && (c || p) ? /* @__PURE__ */ i(s, {}) : /* @__PURE__ */ i(A, { machine: l, onEvent: m });
28
+ return /* @__PURE__ */ e(a, { machine: t, onEvent: r });
47
29
  }
48
30
  export {
49
- v as DocumentSigner
31
+ R as DocumentSigner
50
32
  };
51
33
  //# sourceMappingURL=DocumentSigner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Employee/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { useIsMutating } from '@tanstack/react-query'\nimport { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { useI9VerificationGetAuthorization } from '@gusto/embedded-api/react-query/i9VerificationGetAuthorization'\nimport { mutationKeyI9VerificationUpdate } from '@gusto/embedded-api/react-query/i9VerificationUpdate'\nimport { useEmployeesGet } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n DocumentListContextual,\n EmploymentEligibilityContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useBase } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n employeeId: string\n withEmployeeI9?: boolean\n}\n\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, onEvent, dictionary, withEmployeeI9 = false }: DocumentSignerProps) {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n const { LoadingIndicator } = useBase()\n\n const { data: employeeData, isLoading: employeeLoading } = useEmployeesGet(\n { employeeId },\n { enabled: withEmployeeI9 },\n )\n\n const employeeHasI9Enabled =\n employeeData?.employee?.onboardingDocumentsConfig?.i9Document === true\n\n const { data: i9AuthData, isLoading: i9AuthLoading } = useI9VerificationGetAuthorization(\n { employeeId },\n {\n enabled: withEmployeeI9 && employeeHasI9Enabled,\n retry: false,\n refetchOnMount: false,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n throwOnError: (error: Error) => {\n return !(error instanceof APIError && error.httpMeta.response.status === 404)\n },\n },\n )\n\n const needsI9Form =\n withEmployeeI9 && employeeHasI9Enabled && !i9AuthData?.i9Authorization?.employeeSigned\n\n const machine = useMemo(\n () =>\n createMachine(\n needsI9Form ? 'employmentEligibility' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: needsI9Form ? EmploymentEligibilityContextual : DocumentListContextual,\n employeeId,\n withEmployeeI9,\n }),\n ),\n [employeeId, needsI9Form, withEmployeeI9],\n )\n\n const isSubmittingI9 = useIsMutating({ mutationKey: mutationKeyI9VerificationUpdate() }) > 0\n\n if (!isSubmittingI9 && withEmployeeI9 && (employeeLoading || i9AuthLoading)) {\n return <LoadingIndicator />\n }\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","props","jsx","BaseComponent","Root","employeeId","onEvent","dictionary","withEmployeeI9","useComponentDictionary","LoadingIndicator","useBase","employeeData","employeeLoading","useEmployeesGet","employeeHasI9Enabled","i9AuthData","i9AuthLoading","useI9VerificationGetAuthorization","error","APIError","needsI9Form","machine","useMemo","createMachine","documentSignerMachine","initialContext","EmploymentEligibilityContextual","DocumentListContextual","useIsMutating","mutationKeyI9VerificationUpdate","Flow"],"mappings":";;;;;;;;;;;;;;AAuBO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,GAAY,gBAAAC,IAAiB,MAA8B;AAC9F,EAAAC,EAAuB,2BAA2BF,CAAU;AAC5D,QAAM,EAAE,kBAAAG,EAAA,IAAqBC,EAAA,GAEvB,EAAE,MAAMC,GAAc,WAAWC,MAAoBC;AAAA,IACzD,EAAE,YAAAT,EAAA;AAAA,IACF,EAAE,SAASG,EAAA;AAAA,EAAe,GAGtBO,IACJH,GAAc,UAAU,2BAA2B,eAAe,IAE9D,EAAE,MAAMI,GAAY,WAAWC,MAAkBC;AAAA,IACrD,EAAE,YAAAb,EAAA;AAAA,IACF;AAAA,MACE,SAASG,KAAkBO;AAAA,MAC3B,OAAO;AAAA,MACP,gBAAgB;AAAA,MAChB,sBAAsB;AAAA,MACtB,WAAW;AAAA,MACX,cAAc,CAACI,MACN,EAAEA,aAAiBC,KAAYD,EAAM,SAAS,SAAS,WAAW;AAAA,IAC3E;AAAA,EACF,GAGIE,IACJb,KAAkBO,KAAwB,CAACC,GAAY,iBAAiB,gBAEpEM,IAAUC;AAAA,IACd,MACEC;AAAA,MACEH,IAAc,0BAA0B;AAAA,MACxCI;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWL,IAAcM,IAAkCC;AAAA,QAC3D,YAAAvB;AAAA,QACA,gBAAAG;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACH,GAAYgB,GAAab,CAAc;AAAA,EAAA;AAK1C,SAAI,EAFmBqB,EAAc,EAAE,aAAaC,EAAA,EAAgC,CAAG,IAAI,MAEpEtB,MAAmBK,KAAmBI,uBACnDP,GAAA,EAAiB,IAGpB,gBAAAR,EAAC6B,GAAA,EAAK,SAAAT,GAAkB,SAAAhB,EAAA,CAAkB;AACnD;"}
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 EmploymentEligibilityContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useBase } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n employeeId: string\n withEmployeeI9?: boolean\n}\n\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, onEvent, dictionary, withEmployeeI9 = false }: DocumentSignerProps) {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n useBase()\n\n // TODO: I9 authorization query temporarily removed to unblock RC verification.\n // The useI9VerificationGetAuthorization call was causing an error boundary retry\n // loop in published builds. Stubbing needsI9Form to false skips the employment\n // eligibility step entirely.\n const needsI9Form = false as boolean\n\n const machine = useMemo(\n () =>\n createMachine(\n needsI9Form ? 'employmentEligibility' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: needsI9Form ? EmploymentEligibilityContextual : DocumentListContextual,\n employeeId,\n withEmployeeI9,\n }),\n ),\n [employeeId, needsI9Form, withEmployeeI9],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","props","jsx","BaseComponent","Root","employeeId","onEvent","dictionary","withEmployeeI9","useComponentDictionary","useBase","machine","useMemo","createMachine","documentSignerMachine","initialContext","DocumentListContextual","Flow"],"mappings":";;;;;;;;;AAkBO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,GAAY,gBAAAC,IAAiB,MAA8B;AAC9F,EAAAC,EAAuB,2BAA2BF,CAAU,GAC5DG,EAAA;AAQA,QAAMC,IAAUC;AAAA,IACd,MACEC;AAAA,MAC0C;AAAA,MACxCC;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAA2DC;AAAA,QAC3D,YAAAX;AAAA,QACA,gBAAAG;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACH,GAdiB,IAcQG,CAAc;AAAA,EAAA;AAG1C,SAAO,gBAAAN,EAACe,GAAA,EAAK,SAAAN,GAAkB,SAAAL,EAAA,CAAkB;AACnD;"}
@@ -1,68 +1,52 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { APIError as I } from "@gusto/embedded-api/models/errors/apierror";
3
- import { useI9VerificationGetAuthorization as A } from "@gusto/embedded-api/react-query/i9VerificationGetAuthorization";
4
- import { useI9VerificationUpdateMutation as _ } from "@gusto/embedded-api/react-query/i9VerificationUpdate";
5
- import { EmploymentEligibilityPresentation as v } from "./EmploymentEligibilityPresentation.js";
6
- import { BaseComponent as x } from "../../../Base/Base.js";
7
- import { useBase as z } from "../../../Base/useBase.js";
8
- import { useComponentDictionary as T, useI18n as L } from "../../../../i18n/I18n.js";
9
- import { componentEvents as M } from "../../../../shared/constants.js";
10
- function G(i) {
11
- return /* @__PURE__ */ r(x, { ...i, children: /* @__PURE__ */ r(O, { ...i }) });
2
+ import { useI9VerificationUpdateMutation as b } from "@gusto/embedded-api/react-query/i9VerificationUpdate";
3
+ import { EmploymentEligibilityPresentation as f } from "./EmploymentEligibilityPresentation.js";
4
+ import { BaseComponent as h } from "../../../Base/Base.js";
5
+ import { useBase as g } from "../../../Base/useBase.js";
6
+ import { useComponentDictionary as _, useI18n as I } from "../../../../i18n/I18n.js";
7
+ import { componentEvents as v } from "../../../../shared/constants.js";
8
+ function z(t) {
9
+ return /* @__PURE__ */ r(h, { ...t, children: /* @__PURE__ */ r(D, { ...t }) });
12
10
  }
13
- const O = ({ employeeId: i, dictionary: s }) => {
14
- T("Employee.EmploymentEligibility", s), L("Employee.EmploymentEligibility");
15
- const { onEvent: m, baseSubmitHandler: c, LoadingIndicator: p } = z(), { data: l, isLoading: f } = A(
16
- { employeeId: i },
11
+ const D = ({ employeeId: t, dictionary: m }) => {
12
+ _("Employee.EmploymentEligibility", m), I("Employee.EmploymentEligibility");
13
+ const { onEvent: u, baseSubmitHandler: s } = g(), n = void 0, { mutateAsync: a, isPending: l } = b();
14
+ return /* @__PURE__ */ r(
15
+ f,
17
16
  {
18
- retry: !1,
19
- refetchOnMount: !1,
20
- refetchOnWindowFocus: !1,
21
- staleTime: 1 / 0,
22
- throwOnError: (o) => !(o instanceof I && o.httpMeta.response.status === 404)
23
- }
24
- ), t = l?.i9Authorization, { mutateAsync: y, isPending: u } = _(), d = async (o) => {
25
- await c(o, async (h) => {
26
- const { authorizationStatus: e, documentType: a, documentNumber: n, expirationDate: b, country: g } = h;
27
- if (!e) return;
28
- const D = await y({
29
- request: {
30
- employeeId: i,
31
- requestBody: {
32
- authorizationStatus: e,
33
- version: t?.version,
34
- ...e === "permanent_resident" && n && {
35
- documentType: "uscis_alien_registration_number",
36
- documentNumber: n
37
- },
38
- ...e === "alien" && {
39
- ...n && a && { documentType: a, documentNumber: n },
40
- expirationDate: b,
41
- ...a === "foreign_passport" && { country: g }
17
+ onSubmit: async (c) => {
18
+ await s(c, async (p) => {
19
+ const { authorizationStatus: e, documentType: o, documentNumber: i, expirationDate: E, country: y } = p;
20
+ if (!e) return;
21
+ const d = await a({
22
+ request: {
23
+ employeeId: t,
24
+ requestBody: {
25
+ authorizationStatus: e,
26
+ version: n?.version,
27
+ ...e === "permanent_resident" && i && {
28
+ documentType: "uscis_alien_registration_number",
29
+ documentNumber: i
30
+ },
31
+ ...e === "alien" && {
32
+ ...i && o && { documentType: o, documentNumber: i },
33
+ expirationDate: E,
34
+ ...o === "foreign_passport" && { country: y }
35
+ }
36
+ }
42
37
  }
43
- }
44
- }
45
- });
46
- m(M.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE, D.i9Authorization);
47
- });
48
- }, E = t ? {
49
- authorizationStatus: t.authorizationStatus,
50
- documentType: t.documentType ?? void 0,
51
- expirationDate: t.expirationDate ? new Date(t.expirationDate) : void 0,
52
- country: t.country ?? void 0
53
- } : {};
54
- return !u && f ? /* @__PURE__ */ r(p, {}) : /* @__PURE__ */ r(
55
- v,
56
- {
57
- onSubmit: d,
58
- defaultValues: E,
59
- hasDocumentNumber: t?.hasDocumentNumber,
60
- isPending: u
38
+ });
39
+ u(v.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE, d.i9Authorization);
40
+ });
41
+ },
42
+ defaultValues: {},
43
+ hasDocumentNumber: n?.hasDocumentNumber,
44
+ isPending: l
61
45
  },
62
- t?.uuid
46
+ n?.uuid
63
47
  );
64
48
  };
65
49
  export {
66
- G as EmploymentEligibility
50
+ z as EmploymentEligibility
67
51
  };
68
52
  //# sourceMappingURL=EmploymentEligibility.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmploymentEligibility.js","sources":["../../../../../src/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.tsx"],"sourcesContent":["import { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { useI9VerificationGetAuthorization } from '@gusto/embedded-api/react-query/i9VerificationGetAuthorization'\nimport { useI9VerificationUpdateMutation } from '@gusto/embedded-api/react-query/i9VerificationUpdate'\nimport { EmploymentEligibilityPresentation } from './EmploymentEligibilityPresentation'\nimport type {\n EmploymentEligibilityInputs,\n EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface EmploymentEligibilityProps extends BaseComponentInterface<'Employee.EmploymentEligibility'> {\n employeeId: string\n}\n\nexport function EmploymentEligibility(props: EmploymentEligibilityProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, dictionary }: EmploymentEligibilityProps) => {\n useComponentDictionary('Employee.EmploymentEligibility', dictionary)\n useI18n('Employee.EmploymentEligibility')\n const { onEvent, baseSubmitHandler, LoadingIndicator } = useBase()\n\n const { data: i9AuthData, isLoading } = useI9VerificationGetAuthorization(\n { employeeId },\n {\n retry: false,\n refetchOnMount: false,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n throwOnError: (error: Error) => {\n return !(error instanceof APIError && error.httpMeta.response.status === 404)\n },\n },\n )\n\n const existingAuth = i9AuthData?.i9Authorization\n\n const { mutateAsync: updateI9Authorization, isPending } = useI9VerificationUpdateMutation()\n\n const handleSubmit = async (data: EmploymentEligibilityPayload) => {\n await baseSubmitHandler(data, async payload => {\n const { authorizationStatus, documentType, documentNumber, expirationDate, country } = payload\n\n if (!authorizationStatus) return\n\n const result = await updateI9Authorization({\n request: {\n employeeId,\n requestBody: {\n authorizationStatus,\n version: existingAuth?.version,\n ...(authorizationStatus === 'permanent_resident' &&\n documentNumber && {\n documentType: 'uscis_alien_registration_number',\n documentNumber,\n }),\n ...(authorizationStatus === 'alien' && {\n ...(documentNumber && documentType && { documentType, documentNumber }),\n expirationDate,\n ...(documentType === 'foreign_passport' && { country }),\n }),\n },\n },\n })\n\n onEvent(componentEvents.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE, result.i9Authorization)\n })\n }\n\n const defaultValues: Partial<EmploymentEligibilityInputs> = existingAuth\n ? {\n authorizationStatus: existingAuth.authorizationStatus,\n documentType: existingAuth.documentType ?? undefined,\n expirationDate: existingAuth.expirationDate\n ? new Date(existingAuth.expirationDate)\n : undefined,\n country: existingAuth.country ?? undefined,\n }\n : {}\n\n if (!isPending && isLoading) return <LoadingIndicator />\n\n return (\n <EmploymentEligibilityPresentation\n key={existingAuth?.uuid}\n onSubmit={handleSubmit}\n defaultValues={defaultValues}\n hasDocumentNumber={existingAuth?.hasDocumentNumber}\n isPending={isPending}\n />\n )\n}\n"],"names":["EmploymentEligibility","props","jsx","BaseComponent","Root","employeeId","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","LoadingIndicator","useBase","i9AuthData","isLoading","useI9VerificationGetAuthorization","error","APIError","existingAuth","updateI9Authorization","isPending","useI9VerificationUpdateMutation","handleSubmit","data","payload","authorizationStatus","documentType","documentNumber","expirationDate","country","result","componentEvents","defaultValues","EmploymentEligibilityPresentation"],"mappings":";;;;;;;;;AAkBO,SAASA,EAAsBC,GAAmC;AACvE,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,YAAAC,QAA6C;AACvE,EAAAC,EAAuB,kCAAkCD,CAAU,GACnEE,EAAQ,gCAAgC;AACxC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,GAAmB,kBAAAC,EAAA,IAAqBC,EAAA,GAEnD,EAAE,MAAMC,GAAY,WAAAC,EAAA,IAAcC;AAAA,IACtC,EAAE,YAAAV,EAAA;AAAA,IACF;AAAA,MACE,OAAO;AAAA,MACP,gBAAgB;AAAA,MAChB,sBAAsB;AAAA,MACtB,WAAW;AAAA,MACX,cAAc,CAACW,MACN,EAAEA,aAAiBC,KAAYD,EAAM,SAAS,SAAS,WAAW;AAAA,IAC3E;AAAA,EACF,GAGIE,IAAeL,GAAY,iBAE3B,EAAE,aAAaM,GAAuB,WAAAC,EAAA,IAAcC,EAAA,GAEpDC,IAAe,OAAOC,MAAuC;AACjE,UAAMb,EAAkBa,GAAM,OAAMC,MAAW;AAC7C,YAAM,EAAE,qBAAAC,GAAqB,cAAAC,GAAc,gBAAAC,GAAgB,gBAAAC,GAAgB,SAAAC,MAAYL;AAEvF,UAAI,CAACC,EAAqB;AAE1B,YAAMK,IAAS,MAAMX,EAAsB;AAAA,QACzC,SAAS;AAAA,UACP,YAAAd;AAAA,UACA,aAAa;AAAA,YACX,qBAAAoB;AAAA,YACA,SAASP,GAAc;AAAA,YACvB,GAAIO,MAAwB,wBAC1BE,KAAkB;AAAA,cAChB,cAAc;AAAA,cACd,gBAAAA;AAAA,YAAA;AAAA,YAEJ,GAAIF,MAAwB,WAAW;AAAA,cACrC,GAAIE,KAAkBD,KAAgB,EAAE,cAAAA,GAAc,gBAAAC,EAAA;AAAA,cACtD,gBAAAC;AAAA,cACA,GAAIF,MAAiB,sBAAsB,EAAE,SAAAG,EAAA;AAAA,YAAQ;AAAA,UACvD;AAAA,QACF;AAAA,MACF,CACD;AAED,MAAApB,EAAQsB,EAAgB,sCAAsCD,EAAO,eAAe;AAAA,IACtF,CAAC;AAAA,EACH,GAEME,IAAsDd,IACxD;AAAA,IACE,qBAAqBA,EAAa;AAAA,IAClC,cAAcA,EAAa,gBAAgB;AAAA,IAC3C,gBAAgBA,EAAa,iBACzB,IAAI,KAAKA,EAAa,cAAc,IACpC;AAAA,IACJ,SAASA,EAAa,WAAW;AAAA,EAAA,IAEnC,CAAA;AAEJ,SAAI,CAACE,KAAaN,sBAAmBH,GAAA,CAAA,CAAiB,IAGpD,gBAAAT;AAAA,IAAC+B;AAAA,IAAA;AAAA,MAEC,UAAUX;AAAA,MACV,eAAAU;AAAA,MACA,mBAAmBd,GAAc;AAAA,MACjC,WAAAE;AAAA,IAAA;AAAA,IAJKF,GAAc;AAAA,EAAA;AAOzB;"}
1
+ {"version":3,"file":"EmploymentEligibility.js","sources":["../../../../../src/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.tsx"],"sourcesContent":["import type { I9Authorization } from '@gusto/embedded-api/models/components/i9authorization'\nimport { useI9VerificationUpdateMutation } from '@gusto/embedded-api/react-query/i9VerificationUpdate'\nimport { EmploymentEligibilityPresentation } from './EmploymentEligibilityPresentation'\nimport type {\n EmploymentEligibilityInputs,\n EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface EmploymentEligibilityProps extends BaseComponentInterface<'Employee.EmploymentEligibility'> {\n employeeId: string\n}\n\nexport function EmploymentEligibility(props: EmploymentEligibilityProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, dictionary }: EmploymentEligibilityProps) => {\n useComponentDictionary('Employee.EmploymentEligibility', dictionary)\n useI18n('Employee.EmploymentEligibility')\n const { onEvent, baseSubmitHandler } = useBase()\n\n // TODO: Temporarily stubbed to unblock RC verification.\n const existingAuth = undefined as I9Authorization | undefined\n\n const { mutateAsync: updateI9Authorization, isPending } = useI9VerificationUpdateMutation()\n\n const handleSubmit = async (data: EmploymentEligibilityPayload) => {\n await baseSubmitHandler(data, async payload => {\n const { authorizationStatus, documentType, documentNumber, expirationDate, country } = payload\n\n if (!authorizationStatus) return\n\n const result = await updateI9Authorization({\n request: {\n employeeId,\n requestBody: {\n authorizationStatus,\n version: existingAuth?.version,\n ...(authorizationStatus === 'permanent_resident' &&\n documentNumber && {\n documentType: 'uscis_alien_registration_number',\n documentNumber,\n }),\n ...(authorizationStatus === 'alien' && {\n ...(documentNumber && documentType && { documentType, documentNumber }),\n expirationDate,\n ...(documentType === 'foreign_passport' && { country }),\n }),\n },\n },\n })\n\n onEvent(componentEvents.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE, result.i9Authorization)\n })\n }\n\n const defaultValues: Partial<EmploymentEligibilityInputs> = existingAuth\n ? {\n authorizationStatus: existingAuth.authorizationStatus,\n documentType: existingAuth.documentType ?? undefined,\n expirationDate: existingAuth.expirationDate\n ? new Date(existingAuth.expirationDate)\n : undefined,\n country: existingAuth.country ?? undefined,\n }\n : {}\n\n return (\n <EmploymentEligibilityPresentation\n key={existingAuth?.uuid}\n onSubmit={handleSubmit}\n defaultValues={defaultValues}\n hasDocumentNumber={existingAuth?.hasDocumentNumber}\n isPending={isPending}\n />\n )\n}\n"],"names":["EmploymentEligibility","props","jsx","BaseComponent","Root","employeeId","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","existingAuth","updateI9Authorization","isPending","useI9VerificationUpdateMutation","EmploymentEligibilityPresentation","data","payload","authorizationStatus","documentType","documentNumber","expirationDate","country","result","componentEvents"],"mappings":";;;;;;;AAiBO,SAASA,EAAsBC,GAAmC;AACvE,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,YAAAC,QAA6C;AACvE,EAAAC,EAAuB,kCAAkCD,CAAU,GACnEE,EAAQ,gCAAgC;AACxC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAGjCC,IAAe,QAEf,EAAE,aAAaC,GAAuB,WAAAC,EAAA,IAAcC,EAAA;AA2C1D,SACE,gBAAAb;AAAA,IAACc;AAAA,IAAA;AAAA,MAEC,UA5CiB,OAAOC,MAAuC;AACjE,cAAMP,EAAkBO,GAAM,OAAMC,MAAW;AAC7C,gBAAM,EAAE,qBAAAC,GAAqB,cAAAC,GAAc,gBAAAC,GAAgB,gBAAAC,GAAgB,SAAAC,MAAYL;AAEvF,cAAI,CAACC,EAAqB;AAE1B,gBAAMK,IAAS,MAAMX,EAAsB;AAAA,YACzC,SAAS;AAAA,cACP,YAAAR;AAAA,cACA,aAAa;AAAA,gBACX,qBAAAc;AAAA,gBACA,SAASP,GAAc;AAAA,gBACvB,GAAIO,MAAwB,wBAC1BE,KAAkB;AAAA,kBAChB,cAAc;AAAA,kBACd,gBAAAA;AAAA,gBAAA;AAAA,gBAEJ,GAAIF,MAAwB,WAAW;AAAA,kBACrC,GAAIE,KAAkBD,KAAgB,EAAE,cAAAA,GAAc,gBAAAC,EAAA;AAAA,kBACtD,gBAAAC;AAAA,kBACA,GAAIF,MAAiB,sBAAsB,EAAE,SAAAG,EAAA;AAAA,gBAAQ;AAAA,cACvD;AAAA,YACF;AAAA,UACF,CACD;AAED,UAAAd,EAAQgB,EAAgB,sCAAsCD,EAAO,eAAe;AAAA,QACtF,CAAC;AAAA,MACH;AAAA,MAiBI,eANA,CAAA;AAAA,MAOA,mBAAmBZ,GAAc;AAAA,MACjC,WAAAE;AAAA,IAAA;AAAA,IAJKF,GAAc;AAAA,EAAA;AAOzB;"}
@@ -8,13 +8,12 @@ import "@tanstack/react-query";
8
8
  import "../../../Base/useBase.js";
9
9
  import "../../../../shared/constants.js";
10
10
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
11
  import "dompurify";
13
12
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = o("SignatureFormContext");
14
+ const [S, c] = o("SignatureFormContext");
16
15
  export {
17
- d as SignatureFormProvider,
18
- c as useSignatureForm
16
+ c as SignatureFormProvider,
17
+ S as useSignatureForm
19
18
  };
20
19
  //# sourceMappingURL=useSignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
1
+ {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
@@ -1,44 +1,38 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { DocumentList as i } from "./DocumentList/DocumentList.js";
3
- import { SignatureForm as u } from "./SignatureForm/SignatureForm.js";
4
- import { I9SignatureForm as l } from "./I9SignatureForm/I9SignatureForm.js";
5
- import { useFlow as r } from "../../Flow/useFlow.js";
6
- import { ensureRequired as t } from "../../../helpers/ensureRequired.js";
7
- import { EmploymentEligibility as p } from "./EmploymentEligibility/EmploymentEligibility.js";
8
- function E() {
9
- const { employeeId: o, onEvent: e } = r();
10
- return /* @__PURE__ */ n(i, { employeeId: t(o), onEvent: e });
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { DocumentList as u } from "./DocumentList/DocumentList.js";
3
+ import { SignatureForm as i } from "./SignatureForm/SignatureForm.js";
4
+ import { I9SignatureForm as f } from "./I9SignatureForm/I9SignatureForm.js";
5
+ import { useFlow as n } from "../../Flow/useFlow.js";
6
+ import { ensureRequired as r } from "../../../helpers/ensureRequired.js";
7
+ function a() {
8
+ const { employeeId: o, onEvent: e } = n();
9
+ return /* @__PURE__ */ m(u, { employeeId: r(o), onEvent: e });
11
10
  }
12
- function g() {
13
- const { employeeId: o, formId: e, onEvent: m } = r();
14
- return /* @__PURE__ */ n(
15
- u,
11
+ function y() {
12
+ const { employeeId: o, formId: e, onEvent: t } = n();
13
+ return /* @__PURE__ */ m(
14
+ i,
16
15
  {
17
- employeeId: t(o),
18
- formId: t(e),
19
- onEvent: m
16
+ employeeId: r(o),
17
+ formId: r(e),
18
+ onEvent: t
20
19
  }
21
20
  );
22
21
  }
23
22
  function x() {
24
- const { employeeId: o, onEvent: e } = r();
25
- return /* @__PURE__ */ n(p, { employeeId: t(o), onEvent: e });
26
- }
27
- function F() {
28
- const { employeeId: o, formId: e, onEvent: m } = r();
29
- return /* @__PURE__ */ n(
30
- l,
23
+ const { employeeId: o, formId: e, onEvent: t } = n();
24
+ return /* @__PURE__ */ m(
25
+ f,
31
26
  {
32
- employeeId: t(o),
33
- formId: t(e),
34
- onEvent: m
27
+ employeeId: r(o),
28
+ formId: r(e),
29
+ onEvent: t
35
30
  }
36
31
  );
37
32
  }
38
33
  export {
39
- E as DocumentListContextual,
40
- x as EmploymentEligibilityContextual,
41
- F as I9SignatureFormContextual,
42
- g as SignatureFormContextual
34
+ a as DocumentListContextual,
35
+ x as I9SignatureFormContextual,
36
+ y as SignatureFormContextual
43
37
  };
44
38
  //# sourceMappingURL=documentSignerStateMachine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"documentSignerStateMachine.js","sources":["../../../../src/components/Employee/DocumentSigner/documentSignerStateMachine.tsx"],"sourcesContent":["import { type Form } from '@gusto/embedded-api/models/components/form'\nimport { DocumentList } from './DocumentList/DocumentList'\nimport { SignatureForm } from './SignatureForm/SignatureForm'\nimport { EmploymentEligibility } from './EmploymentEligibility'\nimport { I9SignatureForm } from './I9SignatureForm/I9SignatureForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { componentEvents } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_SIGN_FORM]: Form\n [componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN]: { uuid: string; name?: string }\n [componentEvents.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE]: unknown\n [componentEvents.CANCEL]: undefined\n}\n\nexport interface DocumentSignerContextInterface extends FlowContextInterface {\n employeeId: string\n formId?: string\n withEmployeeI9?: boolean\n isI9Form?: boolean\n}\n\nexport function DocumentListContextual() {\n const { employeeId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return <DocumentList employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function SignatureFormContextual() {\n const { employeeId, formId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return (\n <SignatureForm\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n\nexport function EmploymentEligibilityContextual() {\n const { employeeId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return <EmploymentEligibility employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function I9SignatureFormContextual() {\n const { employeeId, formId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return (\n <I9SignatureForm\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["DocumentListContextual","employeeId","onEvent","useFlow","DocumentList","ensureRequired","SignatureFormContextual","formId","jsx","SignatureForm","EmploymentEligibilityContextual","EmploymentEligibility","I9SignatureFormContextual","I9SignatureForm"],"mappings":";;;;;;;AAuBO,SAASA,IAAyB;AACvC,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAEhC,2BAAQC,GAAA,EAAa,YAAYC,EAAeJ,CAAU,GAAG,SAAAC,GAAkB;AACjF;AAEO,SAASI,IAA0B;AACxC,QAAM,EAAE,YAAAL,GAAY,QAAAM,GAAQ,SAAAL,EAAA,IAAYC,EAAA;AAExC,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYJ,EAAeJ,CAAU;AAAA,MACrC,QAAQI,EAAeE,CAAM;AAAA,MAC7B,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASQ,IAAkC;AAChD,QAAM,EAAE,YAAAT,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAEhC,2BAAQQ,GAAA,EAAsB,YAAYN,EAAeJ,CAAU,GAAG,SAAAC,GAAkB;AAC1F;AAEO,SAASU,IAA4B;AAC1C,QAAM,EAAE,YAAAX,GAAY,QAAAM,GAAQ,SAAAL,EAAA,IAAYC,EAAA;AAExC,SACE,gBAAAK;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,YAAYR,EAAeJ,CAAU;AAAA,MACrC,QAAQI,EAAeE,CAAM;AAAA,MAC7B,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"documentSignerStateMachine.js","sources":["../../../../src/components/Employee/DocumentSigner/documentSignerStateMachine.tsx"],"sourcesContent":["import { type Form } from '@gusto/embedded-api/models/components/form'\nimport { DocumentList } from './DocumentList/DocumentList'\nimport { SignatureForm } from './SignatureForm/SignatureForm'\nimport { EmploymentEligibility } from './EmploymentEligibility'\nimport { I9SignatureForm } from './I9SignatureForm/I9SignatureForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { componentEvents } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_SIGN_FORM]: Form\n [componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN]: { uuid: string; name?: string }\n [componentEvents.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE]: unknown\n [componentEvents.CANCEL]: undefined\n}\n\nexport interface DocumentSignerContextInterface extends FlowContextInterface {\n employeeId: string\n formId?: string\n withEmployeeI9?: boolean\n isI9Form?: boolean\n}\n\nexport function DocumentListContextual() {\n const { employeeId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return <DocumentList employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function SignatureFormContextual() {\n const { employeeId, formId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return (\n <SignatureForm\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n\nexport function EmploymentEligibilityContextual() {\n const { employeeId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return <EmploymentEligibility employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function I9SignatureFormContextual() {\n const { employeeId, formId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return (\n <I9SignatureForm\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["DocumentListContextual","employeeId","onEvent","useFlow","DocumentList","ensureRequired","SignatureFormContextual","formId","jsx","SignatureForm","I9SignatureFormContextual","I9SignatureForm"],"mappings":";;;;;;AAuBO,SAASA,IAAyB;AACvC,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAEhC,2BAAQC,GAAA,EAAa,YAAYC,EAAeJ,CAAU,GAAG,SAAAC,GAAkB;AACjF;AAEO,SAASI,IAA0B;AACxC,QAAM,EAAE,YAAAL,GAAY,QAAAM,GAAQ,SAAAL,EAAA,IAAYC,EAAA;AAExC,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYJ,EAAeJ,CAAU;AAAA,MACrC,QAAQI,EAAeE,CAAM;AAAA,MAC7B,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;AAQO,SAASQ,IAA4B;AAC1C,QAAM,EAAE,YAAAT,GAAY,QAAAM,GAAQ,SAAAL,EAAA,IAAYC,EAAA;AAExC,SACE,gBAAAK;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,YAAYN,EAAeJ,CAAU;AAAA,MACrC,QAAQI,EAAeE,CAAM;AAAA,MAC7B,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -8,13 +8,12 @@ import "@tanstack/react-query";
8
8
  import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
11
  import "dompurify";
13
12
  import "../../../contexts/LocaleProvider/useLocale.js";
14
13
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [c, d] = o("EmployeeListContext");
14
+ const [L, c] = o("EmployeeListContext");
16
15
  export {
17
- d as EmployeeListProvider,
18
- c as useEmployeeList
16
+ c as EmployeeListProvider,
17
+ L as useEmployeeList
19
18
  };
20
19
  //# sourceMappingURL=useEmployeeList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: PaginationItemsPerPage) => void\n currentPage: number\n totalPages: number\n totalCount: number\n employees: Employee[]\n itemsPerPage: PaginationItemsPerPage\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: PaginationItemsPerPage) => void\n currentPage: number\n totalPages: number\n totalCount: number\n employees: Employee[]\n itemsPerPage: PaginationItemsPerPage\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AA0BA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -8,13 +8,12 @@ import "@tanstack/react-query";
8
8
  import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
11
  import "dompurify";
13
12
  import "../../../contexts/LocaleProvider/useLocale.js";
14
13
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [T, c] = o("FederalTaxesContext");
14
+ const [F, T] = o("FederalTaxesContext");
16
15
  export {
17
- c as FederalTaxesProvider,
18
- T as useFederalTaxes
16
+ T as FederalTaxesProvider,
17
+ F as useFederalTaxes
19
18
  };
20
19
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype FederalTaxesContextType = {\n isPending: boolean\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] =\n createCompoundContext<FederalTaxesContextType>('FederalTaxesContext')\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAMA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype FederalTaxesContextType = {\n isPending: boolean\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] =\n createCompoundContext<FederalTaxesContextType>('FederalTaxesContext')\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAMA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -10,11 +10,10 @@ import "@tanstack/react-query";
10
10
  import "../../Base/useBase.js";
11
11
  import "../../../shared/constants.js";
12
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
13
  import "dompurify";
15
14
  import "../../../contexts/LocaleProvider/useLocale.js";
16
15
  import { createCompoundContext as a } from "../../Base/createCompoundContext.js";
17
- const x = t.union([
16
+ const B = t.union([
18
17
  l.extend({
19
18
  type: t.literal("Direct Deposit"),
20
19
  isSplit: t.literal(!1)
@@ -54,10 +53,10 @@ const x = t.union([
54
53
  remainder: t.string()
55
54
  })
56
55
  ])
57
- ]), [S, k] = a("PaymentMethodContext");
56
+ ]), [x, S] = a("PaymentMethodContext");
58
57
  export {
59
- x as CombinedSchema,
60
- k as PaymentMethodProvider,
61
- S as usePaymentMethod
58
+ B as CombinedSchema,
59
+ S as PaymentMethodProvider,
60
+ x as usePaymentMethod
62
61
  };
63
62
  //# sourceMappingURL=usePaymentMethod.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaymentMethod.js","sources":["../../../../src/components/Employee/PaymentMethod/usePaymentMethod.ts"],"sourcesContent":["import type { EmployeeBankAccount } from '@gusto/embedded-api/models/components/employeebankaccount'\nimport type { EmployeePaymentMethod } from '@gusto/embedded-api/models/components/employeepaymentmethod'\nimport { z } from 'zod'\nimport { BankAccountSchema } from './BankAccount'\nimport { createCompoundContext } from '@/components/Base'\n\nexport const CombinedSchema = z.union([\n BankAccountSchema.extend({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n hasBankPayload: z.literal(false),\n }),\n z.object({\n type: z.literal('Check'),\n }),\n z.discriminatedUnion('splitBy', [\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Percentage'),\n splitAmount: z.record(z.string(), z.number().max(100).min(0)).refine(\n input => Object.values(input).reduce((acc, curr) => acc + curr, 0) === 100,\n input => {\n const total = Object.values(input).reduce((acc, curr) => acc + curr, 0)\n return {\n message: `percentage_split_total_error:${total}`,\n }\n },\n ),\n priority: z.record(z.string(), z.number()),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Amount'),\n priority: z.record(z.string(), z.number()).refine(input => {\n const arr = Object.values(input)\n return arr.filter((item, index) => arr.indexOf(item) !== index).length === 0\n }),\n splitAmount: z.record(z.string(), z.number().min(0).nullable()),\n remainder: z.string(),\n }),\n ]),\n])\n\nexport type CombinedSchemaInputs = z.input<typeof CombinedSchema>\nexport type CombinedSchemaOutputs = z.output<typeof CombinedSchema>\n\ntype PaymentMethodContextType = {\n bankAccounts: EmployeeBankAccount[]\n isPending: boolean\n watchedType?: string\n mode: MODE\n paymentMethod: EmployeePaymentMethod\n handleAdd: () => void\n handleSplit: () => void\n handleCancel: () => void\n handleDelete: (uuid: string) => void\n isAdmin: boolean\n}\n\nexport type MODE = 'ADD' | 'LIST' | 'SPLIT' | 'INITIAL'\n\nconst [usePaymentMethod, PaymentMethodProvider] =\n createCompoundContext<PaymentMethodContextType>('PaymentMethodContext')\nexport { usePaymentMethod, PaymentMethodProvider }\n"],"names":["CombinedSchema","z","BankAccountSchema","input","acc","curr","arr","item","index","usePaymentMethod","PaymentMethodProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAMO,MAAMA,IAAiBC,EAAE,MAAM;AAAA,EACpCC,EAAkB,OAAO;AAAA,IACvB,MAAMD,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,EAAA,CACzB;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,IACxB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,EAAA,CAChC;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,OAAO;AAAA,EAAA,CACxB;AAAA,EACDA,EAAE,mBAAmB,WAAW;AAAA,IAC9BA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,YAAY;AAAA,MAC/B,aAAaA,EAAE,OAAOA,EAAE,UAAUA,EAAE,OAAA,EAAS,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE;AAAA,QAC5D,CAAAE,MAAS,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,MAAM;AAAA,QACvE,CAAAF,OAES;AAAA,UACL,SAAS,gCAFG,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,CAEtB;AAAA,QAAA;AAAA,MAElD;AAAA,MAEF,UAAUJ,EAAE,OAAOA,EAAE,UAAUA,EAAE,QAAQ;AAAA,IAAA,CAC1C;AAAA,IACDA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,QAAQ;AAAA,MAC3B,UAAUA,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,CAAQ,EAAE,OAAO,CAAAE,MAAS;AACzD,cAAMG,IAAM,OAAO,OAAOH,CAAK;AAC/B,eAAOG,EAAI,OAAO,CAACC,GAAMC,MAAUF,EAAI,QAAQC,CAAI,MAAMC,CAAK,EAAE,WAAW;AAAA,MAC7E,CAAC;AAAA,MACD,aAAaP,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,UAAU;AAAA,MAC9D,WAAWA,EAAE,OAAA;AAAA,IAAO,CACrB;AAAA,EAAA,CACF;AACH,CAAC,GAoBK,CAACQ,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
1
+ {"version":3,"file":"usePaymentMethod.js","sources":["../../../../src/components/Employee/PaymentMethod/usePaymentMethod.ts"],"sourcesContent":["import type { EmployeeBankAccount } from '@gusto/embedded-api/models/components/employeebankaccount'\nimport type { EmployeePaymentMethod } from '@gusto/embedded-api/models/components/employeepaymentmethod'\nimport { z } from 'zod'\nimport { BankAccountSchema } from './BankAccount'\nimport { createCompoundContext } from '@/components/Base'\n\nexport const CombinedSchema = z.union([\n BankAccountSchema.extend({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n hasBankPayload: z.literal(false),\n }),\n z.object({\n type: z.literal('Check'),\n }),\n z.discriminatedUnion('splitBy', [\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Percentage'),\n splitAmount: z.record(z.string(), z.number().max(100).min(0)).refine(\n input => Object.values(input).reduce((acc, curr) => acc + curr, 0) === 100,\n input => {\n const total = Object.values(input).reduce((acc, curr) => acc + curr, 0)\n return {\n message: `percentage_split_total_error:${total}`,\n }\n },\n ),\n priority: z.record(z.string(), z.number()),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Amount'),\n priority: z.record(z.string(), z.number()).refine(input => {\n const arr = Object.values(input)\n return arr.filter((item, index) => arr.indexOf(item) !== index).length === 0\n }),\n splitAmount: z.record(z.string(), z.number().min(0).nullable()),\n remainder: z.string(),\n }),\n ]),\n])\n\nexport type CombinedSchemaInputs = z.input<typeof CombinedSchema>\nexport type CombinedSchemaOutputs = z.output<typeof CombinedSchema>\n\ntype PaymentMethodContextType = {\n bankAccounts: EmployeeBankAccount[]\n isPending: boolean\n watchedType?: string\n mode: MODE\n paymentMethod: EmployeePaymentMethod\n handleAdd: () => void\n handleSplit: () => void\n handleCancel: () => void\n handleDelete: (uuid: string) => void\n isAdmin: boolean\n}\n\nexport type MODE = 'ADD' | 'LIST' | 'SPLIT' | 'INITIAL'\n\nconst [usePaymentMethod, PaymentMethodProvider] =\n createCompoundContext<PaymentMethodContextType>('PaymentMethodContext')\nexport { usePaymentMethod, PaymentMethodProvider }\n"],"names":["CombinedSchema","z","BankAccountSchema","input","acc","curr","arr","item","index","usePaymentMethod","PaymentMethodProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAMO,MAAMA,IAAiBC,EAAE,MAAM;AAAA,EACpCC,EAAkB,OAAO;AAAA,IACvB,MAAMD,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,EAAA,CACzB;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,IACxB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,EAAA,CAChC;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,OAAO;AAAA,EAAA,CACxB;AAAA,EACDA,EAAE,mBAAmB,WAAW;AAAA,IAC9BA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,YAAY;AAAA,MAC/B,aAAaA,EAAE,OAAOA,EAAE,UAAUA,EAAE,OAAA,EAAS,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE;AAAA,QAC5D,CAAAE,MAAS,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,MAAM;AAAA,QACvE,CAAAF,OAES;AAAA,UACL,SAAS,gCAFG,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,CAEtB;AAAA,QAAA;AAAA,MAElD;AAAA,MAEF,UAAUJ,EAAE,OAAOA,EAAE,UAAUA,EAAE,QAAQ;AAAA,IAAA,CAC1C;AAAA,IACDA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,QAAQ;AAAA,MAC3B,UAAUA,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,CAAQ,EAAE,OAAO,CAAAE,MAAS;AACzD,cAAMG,IAAM,OAAO,OAAOH,CAAK;AAC/B,eAAOG,EAAI,OAAO,CAACC,GAAMC,MAAUF,EAAI,QAAQC,CAAI,MAAMC,CAAK,EAAE,WAAW;AAAA,MAC7E,CAAC;AAAA,MACD,aAAaP,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,UAAU;AAAA,MAC9D,WAAWA,EAAE,OAAA;AAAA,IAAO,CACrB;AAAA,EAAA,CACF;AACH,CAAC,GAoBK,CAACQ,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
@@ -8,13 +8,12 @@ import "@tanstack/react-query";
8
8
  import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
11
  import "dompurify";
13
12
  import "../../../contexts/LocaleProvider/useLocale.js";
14
13
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [s, u] = o("ProfileContext");
14
+ const [d, s] = o("ProfileContext");
16
15
  export {
17
- u as ProfileProvider,
18
- s as useProfile
16
+ s as ProfileProvider,
17
+ d as useProfile
19
18
  };
20
19
  //# sourceMappingURL=useProfile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useProfile.js","sources":["../../../../src/components/Employee/Profile/useProfile.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype ProfileContextType = {\n companyLocations: Location[]\n workAddresses?: EmployeeWorkAddress[]\n employee?: Employee\n isSelfOnboardingIntended?: boolean\n isPending: boolean\n isAdmin: boolean\n handleCancel: () => void\n isSelfOnboardingEnabled: boolean\n hasCompletedSelfOnboarding: boolean\n}\n\nconst [useProfile, ProfileProvider] = createCompoundContext<ProfileContextType>('ProfileContext')\nexport { useProfile, ProfileProvider }\n"],"names":["useProfile","ProfileProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,CAACA,GAAYC,CAAe,IAAIC,EAA0C,gBAAgB;"}
1
+ {"version":3,"file":"useProfile.js","sources":["../../../../src/components/Employee/Profile/useProfile.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype ProfileContextType = {\n companyLocations: Location[]\n workAddresses?: EmployeeWorkAddress[]\n employee?: Employee\n isSelfOnboardingIntended?: boolean\n isPending: boolean\n isAdmin: boolean\n handleCancel: () => void\n isSelfOnboardingEnabled: boolean\n hasCompletedSelfOnboarding: boolean\n}\n\nconst [useProfile, ProfileProvider] = createCompoundContext<ProfileContextType>('ProfileContext')\nexport { useProfile, ProfileProvider }\n"],"names":["useProfile","ProfileProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAkBA,MAAM,CAACA,GAAYC,CAAe,IAAIC,EAA0C,gBAAgB;"}
@@ -8,13 +8,12 @@ import "@tanstack/react-query";
8
8
  import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
11
  import "dompurify";
13
12
  import "../../../contexts/LocaleProvider/useLocale.js";
14
13
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
15
- const [d, u] = t("StateTaxesContext");
14
+ const [c, d] = t("StateTaxesContext");
16
15
  export {
17
- u as StateTaxesProvider,
18
- d as useStateTaxes
16
+ d as StateTaxesProvider,
17
+ c as useStateTaxes
19
18
  };
20
19
  //# sourceMappingURL=useStateTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useStateTaxes.js","sources":["../../../../src/components/Employee/StateTaxes/useStateTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useStateTaxes, StateTaxesProvider] =\n createCompoundContext<StateTaxesContextType>('StateTaxesContext')\nexport { useStateTaxes, StateTaxesProvider }\n"],"names":["useStateTaxes","StateTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAeC,CAAkB,IACtCC,EAA6C,mBAAmB;"}
1
+ {"version":3,"file":"useStateTaxes.js","sources":["../../../../src/components/Employee/StateTaxes/useStateTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useStateTaxes, StateTaxesProvider] =\n createCompoundContext<StateTaxesContextType>('StateTaxesContext')\nexport { useStateTaxes, StateTaxesProvider }\n"],"names":["useStateTaxes","StateTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AASA,MAAM,CAACA,GAAeC,CAAkB,IACtCC,EAA6C,mBAAmB;"}
@@ -8,13 +8,12 @@ import "@tanstack/react-query";
8
8
  import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
11
  import "dompurify";
13
12
  import "../../../contexts/LocaleProvider/useLocale.js";
14
13
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [u, f] = o("TaxesContext");
14
+ const [d, u] = o("TaxesContext");
16
15
  export {
17
- f as TaxesProvider,
18
- u as useTaxes
16
+ u as TaxesProvider,
17
+ d as useTaxes
19
18
  };
20
19
  //# sourceMappingURL=useTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTaxes.js","sources":["../../../../src/components/Employee/Taxes/useTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype TaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useTaxes, TaxesProvider] = createCompoundContext<TaxesContextType>('TaxesContext')\nexport { useTaxes, TaxesProvider }\n"],"names":["useTaxes","TaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAUC,CAAa,IAAIC,EAAwC,cAAc;"}
1
+ {"version":3,"file":"useTaxes.js","sources":["../../../../src/components/Employee/Taxes/useTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype TaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useTaxes, TaxesProvider] = createCompoundContext<TaxesContextType>('TaxesContext')\nexport { useTaxes, TaxesProvider }\n"],"names":["useTaxes","TaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AASA,MAAM,CAACA,GAAUC,CAAa,IAAIC,EAAwC,cAAc;"}
@@ -10,17 +10,16 @@ import "@tanstack/react-query";
10
10
  import { useBase as M } from "../Base/useBase.js";
11
11
  import "../../shared/constants.js";
12
12
  import "../../contexts/ComponentAdapter/useComponentContext.js";
13
- import "../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
13
  import "dompurify";
15
14
  import "../../contexts/LocaleProvider/useLocale.js";
16
- const F = ({
15
+ const z = ({
17
16
  companyId: r,
18
17
  payrollId: s,
19
18
  employeeUuids: a,
20
19
  sortBy: l,
21
20
  onDataReady: n
22
21
  }) => {
23
- const { mutateAsync: p, isPending: u } = q(), [t, d] = g(), e = b(!1), { baseSubmitHandler: c } = M(), P = L(() => a?.join(",") ?? "", [a]), { data: m, isLoading: y } = w(
22
+ const { mutateAsync: p, isPending: u } = q(), [t, d] = g(), e = b(!1), { baseSubmitHandler: c } = M(), P = L(() => a?.join(",") ?? "", [a]), { data: y, isLoading: m } = w(
24
23
  {
25
24
  companyId: r,
26
25
  payScheduleId: t?.payPeriod?.payScheduleUuid || ""
@@ -54,17 +53,17 @@ const F = ({
54
53
  j(() => {
55
54
  o();
56
55
  }, [o]);
57
- const h = u && !e.current, f = u && e.current, S = h || y;
56
+ const h = u && !e.current, f = u && e.current, S = h || m;
58
57
  return {
59
58
  handlePreparePayroll: o,
60
59
  preparedPayroll: t,
61
- paySchedule: m?.payScheduleObject,
60
+ paySchedule: y?.payScheduleObject,
62
61
  isLoading: S,
63
62
  isPaginating: f,
64
63
  hasInitialData: e.current
65
64
  };
66
65
  };
67
66
  export {
68
- F as usePreparedPayrollData
67
+ z as usePreparedPayrollData
69
68
  };
70
69
  //# sourceMappingURL=usePreparedPayrollData.js.map