@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.
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +25 -26
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js +25 -43
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +42 -58
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js +25 -31
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +5 -6
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,51 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createMachine as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
[
|
|
26
|
+
[o, !1, n]
|
|
45
27
|
);
|
|
46
|
-
return
|
|
28
|
+
return /* @__PURE__ */ e(a, { machine: t, onEvent: r });
|
|
47
29
|
}
|
|
48
30
|
export {
|
|
49
|
-
|
|
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 {
|
|
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;"}
|
package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js
CHANGED
|
@@ -1,68 +1,52 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
14
|
-
|
|
15
|
-
const { onEvent:
|
|
16
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
46
|
+
n?.uuid
|
|
63
47
|
);
|
|
64
48
|
};
|
|
65
49
|
export {
|
|
66
|
-
|
|
50
|
+
z as EmploymentEligibility
|
|
67
51
|
};
|
|
68
52
|
//# sourceMappingURL=EmploymentEligibility.js.map
|
package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmploymentEligibility.js","sources":["../../../../../src/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.tsx"],"sourcesContent":["import {
|
|
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 [
|
|
14
|
+
const [S, c] = o("SignatureFormContext");
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
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":"
|
|
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
|
|
2
|
-
import { DocumentList as
|
|
3
|
-
import { SignatureForm as
|
|
4
|
-
import { I9SignatureForm as
|
|
5
|
-
import { useFlow as
|
|
6
|
-
import { ensureRequired as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
13
|
-
const { employeeId: o, formId: e, onEvent:
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
11
|
+
function y() {
|
|
12
|
+
const { employeeId: o, formId: e, onEvent: t } = n();
|
|
13
|
+
return /* @__PURE__ */ m(
|
|
14
|
+
i,
|
|
16
15
|
{
|
|
17
|
-
employeeId:
|
|
18
|
-
formId:
|
|
19
|
-
onEvent:
|
|
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,
|
|
25
|
-
return /* @__PURE__ */
|
|
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:
|
|
33
|
-
formId:
|
|
34
|
-
onEvent:
|
|
27
|
+
employeeId: r(o),
|
|
28
|
+
formId: r(e),
|
|
29
|
+
onEvent: t
|
|
35
30
|
}
|
|
36
31
|
);
|
|
37
32
|
}
|
|
38
33
|
export {
|
|
39
|
-
|
|
40
|
-
x as
|
|
41
|
-
|
|
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","
|
|
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 [
|
|
14
|
+
const [L, c] = o("EmployeeListContext");
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
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":"
|
|
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 [
|
|
14
|
+
const [F, T] = o("FederalTaxesContext");
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
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":"
|
|
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
|
|
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
|
-
]), [
|
|
56
|
+
]), [x, S] = a("PaymentMethodContext");
|
|
58
57
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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":"
|
|
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 [
|
|
14
|
+
const [d, s] = o("ProfileContext");
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
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":"
|
|
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 [
|
|
14
|
+
const [c, d] = t("StateTaxesContext");
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
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":"
|
|
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 [
|
|
14
|
+
const [d, u] = o("TaxesContext");
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
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":"
|
|
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
|
|
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:
|
|
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 ||
|
|
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:
|
|
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
|
-
|
|
67
|
+
z as usePreparedPayrollData
|
|
69
68
|
};
|
|
70
69
|
//# sourceMappingURL=usePreparedPayrollData.js.map
|