@gusto/embedded-react-sdk 0.10.7-rc.1 → 0.10.7-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.js +23 -44
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +6 -8
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js +15 -16
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +5 -0
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +48 -0
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -0
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Employee/Deductions/useDeductions.js +6 -5
- package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -3
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/components/Company/StateTaxes/stateTaxesReducer.d.ts +0 -20
- package/dist/components/Company/StateTaxes/stateTaxesReducer.js +0 -40
- package/dist/components/Company/StateTaxes/stateTaxesReducer.js.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { state as o, transition as e, reduce as T } from "robot3";
|
|
2
|
+
import { StateTaxesListContextual as n, StateTaxesFormContextual as i } from "./StateTaxesComponents.js";
|
|
3
|
+
import { componentEvents as a } from "../../../shared/constants.js";
|
|
4
|
+
const S = {
|
|
5
|
+
viewStateTaxes: o(
|
|
6
|
+
e(
|
|
7
|
+
a.COMPANY_STATE_TAX_EDIT,
|
|
8
|
+
"editStateTaxes",
|
|
9
|
+
T(
|
|
10
|
+
(t, s) => ({
|
|
11
|
+
...t,
|
|
12
|
+
component: i,
|
|
13
|
+
state: s.payload.state
|
|
14
|
+
})
|
|
15
|
+
)
|
|
16
|
+
),
|
|
17
|
+
e(a.COMPANY_STATE_TAX_DONE, "done")
|
|
18
|
+
),
|
|
19
|
+
editStateTaxes: o(
|
|
20
|
+
e(
|
|
21
|
+
a.COMPANY_STATE_TAX_UPDATED,
|
|
22
|
+
"viewStateTaxes",
|
|
23
|
+
T(
|
|
24
|
+
(t, s) => ({
|
|
25
|
+
...t,
|
|
26
|
+
component: n,
|
|
27
|
+
state: void 0
|
|
28
|
+
})
|
|
29
|
+
)
|
|
30
|
+
),
|
|
31
|
+
e(
|
|
32
|
+
a.CANCEL,
|
|
33
|
+
"viewStateTaxes",
|
|
34
|
+
T(
|
|
35
|
+
(t) => ({
|
|
36
|
+
...t,
|
|
37
|
+
component: n,
|
|
38
|
+
state: void 0
|
|
39
|
+
})
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
),
|
|
43
|
+
done: o()
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
S as stateTaxesStateMachine
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=stateTaxesStateMachine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateTaxesStateMachine.js","sources":["../../../../src/components/Company/StateTaxes/stateTaxesStateMachine.tsx"],"sourcesContent":["import { reduce, state, state as final, transition } from 'robot3'\nimport type { ComponentType } from 'react'\nimport type { StateTaxesContextInterface } from './StateTaxesComponents'\nimport { StateTaxesFormContextual, StateTaxesListContextual } from './StateTaxesComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType } from '@/types/Helpers'\n\ntype EventPayloads = {\n [componentEvents.COMPANY_STATE_TAX_UPDATED]: undefined\n [componentEvents.COMPANY_STATE_TAX_EDIT]: { state: string }\n}\n\nexport const stateTaxesStateMachine = {\n viewStateTaxes: state(\n transition(\n componentEvents.COMPANY_STATE_TAX_EDIT,\n 'editStateTaxes',\n reduce(\n (\n ctx: StateTaxesContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.COMPANY_STATE_TAX_EDIT>,\n ): StateTaxesContextInterface => ({\n ...ctx,\n component: StateTaxesFormContextual as ComponentType,\n state: ev.payload.state,\n }),\n ),\n ),\n transition(componentEvents.COMPANY_STATE_TAX_DONE, 'done'),\n ),\n editStateTaxes: state(\n transition(\n componentEvents.COMPANY_STATE_TAX_UPDATED,\n 'viewStateTaxes',\n reduce(\n (\n ctx: StateTaxesContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.COMPANY_STATE_TAX_UPDATED>,\n ): StateTaxesContextInterface => ({\n ...ctx,\n component: StateTaxesListContextual as ComponentType,\n state: undefined,\n }),\n ),\n ),\n transition(\n componentEvents.CANCEL,\n 'viewStateTaxes',\n reduce(\n (ctx: StateTaxesContextInterface): StateTaxesContextInterface => ({\n ...ctx,\n component: StateTaxesListContextual as ComponentType,\n state: undefined,\n }),\n ),\n ),\n ),\n done: final(),\n}\n"],"names":["stateTaxesStateMachine","state","transition","componentEvents","reduce","ctx","ev","StateTaxesFormContextual","StateTaxesListContextual","final"],"mappings":";;;AAYO,MAAMA,IAAyB;AAAA,EACpC,gBAAgBC;AAAA,IACdC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEC,GACAC,OACgC;AAAA,UAChC,GAAGD;AAAA,UACH,WAAWE;AAAA,UACX,OAAOD,EAAG,QAAQ;AAAA,QACpB;AAAA,MAAA;AAAA,IAEJ;AAAA,IACAJ,EAAWC,EAAgB,wBAAwB,MAAM;AAAA,EAC3D;AAAA,EACA,gBAAgBF;AAAA,IACdC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEC,GACAC,OACgC;AAAA,UAChC,GAAGD;AAAA,UACH,WAAWG;AAAA,UACX,OAAO;AAAA,QACT;AAAA,MAAA;AAAA,IAEJ;AAAA,IACAN;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiE;AAAA,UAChE,GAAGA;AAAA,UACH,WAAWG;AAAA,UACX,OAAO;AAAA,QACT;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ;AAAA,EACA,MAAMC,EAAM;AACd;"}
|
|
@@ -11,19 +11,20 @@ import "../../Base/useBase.js";
|
|
|
11
11
|
import "../../../shared/constants.js";
|
|
12
12
|
import "dompurify";
|
|
13
13
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
15
|
import { createCompoundContext as r } from "../../Base/createCompoundContext.js";
|
|
15
|
-
const
|
|
16
|
+
const u = t.object({
|
|
16
17
|
street1: t.string().min(1),
|
|
17
18
|
street2: t.string().optional(),
|
|
18
19
|
city: t.string().min(1),
|
|
19
20
|
state: t.string().min(1),
|
|
20
21
|
zip: t.string().min(1)
|
|
21
|
-
}), [
|
|
22
|
+
}), [z, b] = r(
|
|
22
23
|
"ContractorAddressContext"
|
|
23
24
|
);
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
u as AddressFormSchema,
|
|
27
|
+
b as AddressProvider,
|
|
28
|
+
z as useAddress
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=useAddress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAiBa,MAAAA,IAAoBC,EAAE,OAAO;AAAA,EACxC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAO,EAAE,IAAI,CAAC;AACvB,CAAC,GAIK,CAACC,GAAYC,CAAe,IAAIC;AAAA,EACpC;AACF;"}
|
|
@@ -11,8 +11,9 @@ import "../../Base/useBase.js";
|
|
|
11
11
|
import "../../../shared/constants.js";
|
|
12
12
|
import "dompurify";
|
|
13
13
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
15
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
15
|
-
const
|
|
16
|
+
const D = r.object({
|
|
16
17
|
active: r.boolean(),
|
|
17
18
|
amount: r.number().min(0).transform(String),
|
|
18
19
|
description: r.string().min(1),
|
|
@@ -23,10 +24,10 @@ const x = r.object({
|
|
|
23
24
|
annualMaximum: r.number().min(0).transform((t) => t > 0 ? t.toString() : null).nullable(),
|
|
24
25
|
payPeriodMaximum: r.number().min(0).transform((t) => t > 0 ? t.toString() : null).nullable(),
|
|
25
26
|
deductAsPercentage: r.string().transform((t) => t === "true")
|
|
26
|
-
}), [
|
|
27
|
+
}), [S, C] = o("DeductionsContext");
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
D as DeductionSchema,
|
|
30
|
+
C as DeductionsProvider,
|
|
31
|
+
S as useDeductions
|
|
31
32
|
};
|
|
32
33
|
//# sourceMappingURL=useDeductions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeductions.js","sources":["../../../../src/components/Employee/Deductions/useDeductions.ts"],"sourcesContent":["import type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE = 'ADD' | 'LIST' | 'INITIAL' | 'EDIT'\n\nexport const DeductionSchema = z.object({\n active: z.boolean(),\n amount: z.number().min(0).transform(String),\n description: z.string().min(1),\n courtOrdered: z.boolean(),\n times: z.number().nullable(), //The number of times to apply the garnishment. Ignored if recurring is true.\n recurring: z.string().transform(val => val === 'true'),\n annualMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n payPeriodMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n deductAsPercentage: z.string().transform(val => val === 'true'),\n})\n\nexport type DeductionInputs = z.input<typeof DeductionSchema>\nexport type DeductionPayload = z.output<typeof DeductionSchema>\n\ntype DeductionsContextType = {\n isPending: boolean\n deductions: Garnishment[]\n employeeId: string\n mode: MODE\n handleAdd: () => void\n handleCancel: () => void\n handleEdit: (deduction: Garnishment) => void\n handleDelete: (deduction: Garnishment) => void\n handlePassthrough: () => void\n}\nconst [useDeductions, DeductionsProvider] =\n createCompoundContext<DeductionsContextType>('DeductionsContext')\nexport { useDeductions, DeductionsProvider }\n"],"names":["DeductionSchema","z","val","useDeductions","DeductionsProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDeductions.js","sources":["../../../../src/components/Employee/Deductions/useDeductions.ts"],"sourcesContent":["import type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE = 'ADD' | 'LIST' | 'INITIAL' | 'EDIT'\n\nexport const DeductionSchema = z.object({\n active: z.boolean(),\n amount: z.number().min(0).transform(String),\n description: z.string().min(1),\n courtOrdered: z.boolean(),\n times: z.number().nullable(), //The number of times to apply the garnishment. Ignored if recurring is true.\n recurring: z.string().transform(val => val === 'true'),\n annualMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n payPeriodMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n deductAsPercentage: z.string().transform(val => val === 'true'),\n})\n\nexport type DeductionInputs = z.input<typeof DeductionSchema>\nexport type DeductionPayload = z.output<typeof DeductionSchema>\n\ntype DeductionsContextType = {\n isPending: boolean\n deductions: Garnishment[]\n employeeId: string\n mode: MODE\n handleAdd: () => void\n handleCancel: () => void\n handleEdit: (deduction: Garnishment) => void\n handleDelete: (deduction: Garnishment) => void\n handlePassthrough: () => void\n}\nconst [useDeductions, DeductionsProvider] =\n createCompoundContext<DeductionsContextType>('DeductionsContext')\nexport { useDeductions, DeductionsProvider }\n"],"names":["DeductionSchema","z","val","useDeductions","DeductionsProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAMa,MAAAA,IAAkBC,EAAE,OAAO;AAAA,EACtC,QAAQA,EAAE,QAAQ;AAAA,EAClB,QAAQA,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,UAAU,MAAM;AAAA,EAC1C,aAAaA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC7B,cAAcA,EAAE,QAAQ;AAAA,EACxB,OAAOA,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAC3B,WAAWA,EAAE,SAAS,UAAU,CAAAC,MAAOA,MAAQ,MAAM;AAAA,EACrD,eAAeD,EACZ,OAAA,EACA,IAAI,CAAC,EACL,UAAU,CAAQC,MAAAA,IAAM,IAAIA,EAAI,SAAA,IAAa,IAAK,EAClD,SAAS;AAAA,EACZ,kBAAkBD,EACf,OAAA,EACA,IAAI,CAAC,EACL,UAAU,CAAQC,MAAAA,IAAM,IAAIA,EAAI,SAAA,IAAa,IAAK,EAClD,SAAS;AAAA,EACZ,oBAAoBD,EAAE,SAAS,UAAU,CAAAC,MAAOA,MAAQ,MAAM;AAChE,CAAC,GAgBK,CAACC,GAAeC,CAAkB,IACtCC,EAA6C,mBAAmB;"}
|
|
@@ -10,10 +10,11 @@ import "../../../Base/useBase.js";
|
|
|
10
10
|
import "../../../../shared/constants.js";
|
|
11
11
|
import "dompurify";
|
|
12
12
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
14
|
-
const [
|
|
15
|
+
const [d, a] = t("DocumentListContext");
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
a as DocumentListProvider,
|
|
18
|
+
d as useDocumentList
|
|
18
19
|
};
|
|
19
20
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -10,10 +10,11 @@ import "../../../Base/useBase.js";
|
|
|
10
10
|
import "../../../../shared/constants.js";
|
|
11
11
|
import "dompurify";
|
|
12
12
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
14
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
14
|
-
const [
|
|
15
|
+
const [c, d] = o("SignatureFormContext");
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
d as SignatureFormProvider,
|
|
18
|
+
c as useSignatureForm
|
|
18
19
|
};
|
|
19
20
|
//# sourceMappingURL=useSignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":"
|
|
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;"}
|
|
@@ -10,10 +10,11 @@ import "../../Base/useBase.js";
|
|
|
10
10
|
import "../../../shared/constants.js";
|
|
11
11
|
import "dompurify";
|
|
12
12
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
14
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
14
|
-
const [
|
|
15
|
+
const [c, d] = o("EmployeeListContext");
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
d as EmployeeListProvider,
|
|
18
|
+
c as useEmployeeList
|
|
18
19
|
};
|
|
19
20
|
//# sourceMappingURL=useEmployeeList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -12,8 +12,9 @@ import "../../Base/useBase.js";
|
|
|
12
12
|
import "../../../shared/constants.js";
|
|
13
13
|
import "dompurify";
|
|
14
14
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
15
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
15
16
|
import { createCompoundContext as a } from "../../Base/createCompoundContext.js";
|
|
16
|
-
const
|
|
17
|
+
const x = t.union([
|
|
17
18
|
l.extend({
|
|
18
19
|
type: t.literal("Direct Deposit"),
|
|
19
20
|
isSplit: t.literal(!1)
|
|
@@ -53,10 +54,10 @@ const B = t.union([
|
|
|
53
54
|
remainder: t.string()
|
|
54
55
|
})
|
|
55
56
|
])
|
|
56
|
-
]), [
|
|
57
|
+
]), [S, k] = a("PaymentMethodContext");
|
|
57
58
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
x as CombinedSchema,
|
|
60
|
+
k as PaymentMethodProvider,
|
|
61
|
+
S as usePaymentMethod
|
|
61
62
|
};
|
|
62
63
|
//# 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}\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}\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":";;;;;;;;;;;;;;;;AAMa,MAAAA,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,OAAU,GAAAA,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE;AAAA,QAC5D,CAASE,MAAA,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,MAAM;AAAA,QACvE,CAASF,OAEA;AAAA,UACL,SAAS,gCAFG,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,CAEtB;AAAA,QAChD;AAAA,MAEJ;AAAA,MACA,UAAUJ,EAAE,OAAOA,EAAE,OAAU,GAAAA,EAAE,OAAQ,CAAA;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,OAAQ,CAAA,EAAE,OAAO,CAASE,MAAA;AACnD,cAAAG,IAAM,OAAO,OAAOH,CAAK;AACxB,eAAAG,EAAI,OAAO,CAACC,GAAMC,MAAUF,EAAI,QAAQC,CAAI,MAAMC,CAAK,EAAE,WAAW;AAAA,MAAA,CAC5E;AAAA,MACD,aAAaP,EAAE,OAAOA,EAAE,OAAO,GAAGA,EAAE,OAAS,EAAA,IAAI,CAAC,EAAE,UAAU;AAAA,MAC9D,WAAWA,EAAE,OAAO;AAAA,IACrB,CAAA;AAAA,EACF,CAAA;AACH,CAAC,GAmBK,CAACQ,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
|
|
@@ -10,10 +10,11 @@ import "../../Base/useBase.js";
|
|
|
10
10
|
import "../../../shared/constants.js";
|
|
11
11
|
import "dompurify";
|
|
12
12
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
14
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
14
|
-
const [
|
|
15
|
+
const [s, u] = o("ProfileContext");
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
u as ProfileProvider,
|
|
18
|
+
s as useProfile
|
|
18
19
|
};
|
|
19
20
|
//# 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}\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}\n\nconst [useProfile, ProfileProvider] = createCompoundContext<ProfileContextType>('ProfileContext')\nexport { useProfile, ProfileProvider }\n"],"names":["useProfile","ProfileProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAM,CAACA,GAAYC,CAAe,IAAIC,EAA0C,gBAAgB;"}
|
|
@@ -10,10 +10,11 @@ import "../../Base/useBase.js";
|
|
|
10
10
|
import "../../../shared/constants.js";
|
|
11
11
|
import "dompurify";
|
|
12
12
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
14
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
14
|
-
const [
|
|
15
|
+
const [u, f] = o("TaxesContext");
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
f as TaxesProvider,
|
|
18
|
+
u as useTaxes
|
|
18
19
|
};
|
|
19
20
|
//# 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;"}
|