@gusto/embedded-react-sdk 0.10.1 → 0.10.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/components/Base/Base.js +57 -51
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/InternalError/InternalError.js.map +1 -1
  5. package/dist/components/Common/UI/ComboBox/ComboBox.js +31 -33
  6. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  7. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
  8. package/dist/components/Common/UI/Text/TextTypes.d.ts +1 -1
  9. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  10. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  11. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  12. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  14. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  15. package/dist/components/Company/BankAccount/BankAccount.d.ts +2 -2
  16. package/dist/components/Company/BankAccount/BankAccount.js +25 -20
  17. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  18. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +30 -28
  19. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  20. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  21. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  22. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  23. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  24. package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +5 -7
  25. package/dist/components/Company/DocumentSigner/DocumentSigner.js +24 -24
  26. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  27. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  28. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  29. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  30. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  31. package/dist/components/Company/Industry/Context.js +7 -6
  32. package/dist/components/Company/Industry/Context.js.map +1 -1
  33. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  34. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  35. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  36. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  37. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  38. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  39. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  40. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  41. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  42. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  43. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  44. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  45. package/dist/components/Contractor/Address/useAddress.js +6 -5
  46. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  47. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  48. package/dist/components/Employee/Deductions/useDeductions.js +6 -5
  49. package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
  50. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  51. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  52. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  53. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  54. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  55. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  56. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  57. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  58. package/dist/components/Employee/Profile/useProfile.js +4 -3
  59. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  60. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  61. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  62. package/dist/style.css +1 -1
  63. package/package.json +1 -1
@@ -1,43 +1,45 @@
1
- import { jsx as o, jsxs as F, Fragment as C } from "react/jsx-runtime";
2
- import { useBankAccountsCreateMutation as k } from "@gusto/embedded-api/react-query/bankAccountsCreate";
3
- import { useForm as b, FormProvider as g } from "react-hook-form";
4
- import { zodResolver as v } from "@hookform/resolvers/zod";
1
+ import { jsx as o, jsxs as F, Fragment as k } from "react/jsx-runtime";
2
+ import { useBankAccountsCreateMutation as y } from "@gusto/embedded-api/react-query/bankAccountsCreate";
3
+ import { useForm as v, FormProvider as b } from "react-hook-form";
4
+ import { zodResolver as g } from "@hookform/resolvers/zod";
5
+ import { invalidateAllBankAccountsGet as P } from "@gusto/embedded-api/react-query/bankAccountsGet";
6
+ import { useQueryClient as x } from "@tanstack/react-query";
5
7
  import { Head as m } from "./Head.js";
6
- import { BankAccountFormSchema as y, Form as c } from "./Form.js";
7
- import { Actions as i } from "./Actions.js";
8
- import { BankAccountFormProvider as P } from "./context.js";
9
- import { Form as x } from "../../../Common/Form/Form.js";
10
- import { BaseComponent as N } from "../../../Base/Base.js";
11
- import { useBase as S } from "../../../Base/useBase.js";
12
- import { useI18n as E } from "../../../../i18n/I18n.js";
13
- import { Flex as H } from "../../../Common/Flex/Flex.js";
14
- import { componentEvents as R } from "../../../../shared/constants.js";
8
+ import { BankAccountFormSchema as N, Form as i } from "./Form.js";
9
+ import { Actions as c } from "./Actions.js";
10
+ import { BankAccountFormProvider as S } from "./context.js";
11
+ import { Form as E } from "../../../Common/Form/Form.js";
12
+ import { BaseComponent as q } from "../../../Base/Base.js";
13
+ import { useBase as w } from "../../../Base/useBase.js";
14
+ import { useI18n as H } from "../../../../i18n/I18n.js";
15
+ import { Flex as R } from "../../../Common/Flex/Flex.js";
16
+ import { componentEvents as T } from "../../../../shared/constants.js";
15
17
  function r(n) {
16
- return /* @__PURE__ */ o(N, { ...n, children: /* @__PURE__ */ o(T, { ...n, children: n.children }) });
18
+ return /* @__PURE__ */ o(q, { ...n, children: /* @__PURE__ */ o(_, { ...n, children: n.children }) });
17
19
  }
18
- function T({ companyId: n, className: a, children: t }) {
19
- E("Company.BankAccount");
20
- const { onEvent: u, baseSubmitHandler: s } = S(), { mutateAsync: d, isPending: l } = k(), { control: f, ...e } = b({
21
- resolver: v(y),
20
+ function _({ companyId: n, className: a, children: t }) {
21
+ H("Company.BankAccount");
22
+ const { onEvent: u, baseSubmitHandler: s } = w(), l = x(), { mutateAsync: d, isPending: f } = y(), { control: p, ...e } = v({
23
+ resolver: g(N),
22
24
  defaultValues: { accountNumber: "", routingNumber: "" }
23
- }), p = async (A) => {
24
- await s(A, async (h) => {
25
- const { companyBankAccount: B } = await d({
25
+ }), A = async (h) => {
26
+ await s(h, async (B) => {
27
+ const { companyBankAccount: C } = await d({
26
28
  //Account type is always checking for company bank accounts
27
- request: { companyId: n, requestBody: { ...h, accountType: "Checking" } }
29
+ request: { companyId: n, requestBody: { ...B, accountType: "Checking" } }
28
30
  });
29
- u(R.COMPANY_BANK_ACCOUNT_CREATED, B);
31
+ await P(l), u(T.COMPANY_BANK_ACCOUNT_CREATED, C);
30
32
  });
31
33
  };
32
- return /* @__PURE__ */ o("section", { className: a, children: /* @__PURE__ */ o(g, { ...e, control: f, children: /* @__PURE__ */ o(x, { onSubmit: e.handleSubmit(p), children: /* @__PURE__ */ o(P, { value: { isPending: l }, children: /* @__PURE__ */ o(H, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ F(C, { children: [
34
+ return /* @__PURE__ */ o("section", { className: a, children: /* @__PURE__ */ o(b, { ...e, control: p, children: /* @__PURE__ */ o(E, { onSubmit: e.handleSubmit(A), children: /* @__PURE__ */ o(S, { value: { isPending: f }, children: /* @__PURE__ */ o(R, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ F(k, { children: [
33
35
  /* @__PURE__ */ o(m, {}),
34
- /* @__PURE__ */ o(c, {}),
35
- /* @__PURE__ */ o(i, {})
36
+ /* @__PURE__ */ o(i, {}),
37
+ /* @__PURE__ */ o(c, {})
36
38
  ] }) }) }) }) }) });
37
39
  }
38
40
  r.Head = m;
39
- r.Form = c;
40
- r.Actions = i;
41
+ r.Form = i;
42
+ r.Actions = c;
41
43
  export {
42
44
  r as BankAccountForm
43
45
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BankAccountForm.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/BankAccountForm.tsx"],"sourcesContent":["import { useBankAccountsCreateMutation } from '@gusto/embedded-api/react-query/bankAccountsCreate'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { Head } from './Head'\nimport type { BankAccountFormInputs } from './Form'\nimport { BankAccountFormSchema, Form } from './Form'\nimport { Actions } from './Actions'\nimport { BankAccountFormProvider } from './context'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\ninterface BankAccountFormProps extends CommonComponentInterface {\n companyId: string\n}\n\nexport function BankAccountForm(props: BankAccountFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children }: BankAccountFormProps) {\n useI18n('Company.BankAccount')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createBankAccount, isPending: isPendingCreate } =\n useBankAccountsCreateMutation()\n\n const { control, ...methods } = useForm<BankAccountFormInputs>({\n resolver: zodResolver(BankAccountFormSchema),\n defaultValues: { accountNumber: '', routingNumber: '' },\n })\n\n const onSubmit = async (data: BankAccountFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const { companyBankAccount } = await createBankAccount({\n //Account type is always checking for company bank accounts\n request: { companyId, requestBody: { ...payload, accountType: 'Checking' } },\n })\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_CREATED, companyBankAccount)\n })\n }\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <BankAccountFormProvider value={{ isPending: isPendingCreate }}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </BankAccountFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\nBankAccountForm.Head = Head\nBankAccountForm.Form = Form\nBankAccountForm.Actions = Actions\n"],"names":["BankAccountForm","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","createBankAccount","isPendingCreate","useBankAccountsCreateMutation","control","methods","useForm","zodResolver","BankAccountFormSchema","onSubmit","data","payload","companyBankAccount","componentEvents","FormProvider","HtmlForm","BankAccountFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;AAoBO,SAASA,EAAgBC,GAAsD;AAElF,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAkC;AACtE,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,aAAaC,GAAmB,WAAWC,EAAA,IACjDC,EAA8B,GAE1B,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAYC,EAA+B;AAAA,IAC7D,UAAUC,EAAYC,CAAqB;AAAA,IAC3C,eAAe,EAAE,eAAe,IAAI,eAAe,GAAG;AAAA,EAAA,CACvD,GAEKC,IAAW,OAAOC,MAAgC;AAChD,UAAAX,EAAkBW,GAAM,OAAMC,MAAW;AAC7C,YAAM,EAAE,oBAAAC,MAAuB,MAAMX,EAAkB;AAAA;AAAA,QAErD,SAAS,EAAE,WAAAP,GAAW,aAAa,EAAE,GAAGiB,GAAS,aAAa,WAAa,EAAA;AAAA,MAAA,CAC5E;AACO,MAAAb,EAAAe,EAAgB,8BAA8BD,CAAkB;AAAA,IAAA,CACzE;AAAA,EACH;AACA,SACG,gBAAArB,EAAA,WAAA,EAAQ,WAAAI,GACP,UAAA,gBAAAJ,EAACuB,GAAc,EAAA,GAAGT,GAAS,SAAAD,GACzB,UAAC,gBAAAb,EAAAwB,GAAA,EAAS,UAAUV,EAAQ,aAAaI,CAAQ,GAC/C,UAAC,gBAAAlB,EAAAyB,GAAA,EAAwB,OAAO,EAAE,WAAWd,EAC3C,GAAA,UAAA,gBAAAX,EAAC0B,GAAK,EAAA,eAAc,UAAS,KAAK,IAC/B,UAAArB,KAIG,gBAAAsB,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAA5B,EAAC6B,GAAK,EAAA;AAAA,sBACLC,GAAK,EAAA;AAAA,sBACLC,GAAQ,CAAA,CAAA;AAAA,EAAA,EAAA,CACX,EAEJ,CAAA,EAAA,CACF,EACF,CAAA,EAAA,CACF,EACF,CAAA;AAEJ;AACAjC,EAAgB,OAAO+B;AACvB/B,EAAgB,OAAOgC;AACvBhC,EAAgB,UAAUiC;"}
1
+ {"version":3,"file":"BankAccountForm.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/BankAccountForm.tsx"],"sourcesContent":["import { useBankAccountsCreateMutation } from '@gusto/embedded-api/react-query/bankAccountsCreate'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { invalidateAllBankAccountsGet } from '@gusto/embedded-api/react-query/bankAccountsGet'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { Head } from './Head'\nimport type { BankAccountFormInputs } from './Form'\nimport { BankAccountFormSchema, Form } from './Form'\nimport { Actions } from './Actions'\nimport { BankAccountFormProvider } from './context'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\ninterface BankAccountFormProps extends CommonComponentInterface {\n companyId: string\n}\n\nexport function BankAccountForm(props: BankAccountFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children }: BankAccountFormProps) {\n useI18n('Company.BankAccount')\n const { onEvent, baseSubmitHandler } = useBase()\n const queryClient = useQueryClient()\n\n const { mutateAsync: createBankAccount, isPending: isPendingCreate } =\n useBankAccountsCreateMutation()\n\n const { control, ...methods } = useForm<BankAccountFormInputs>({\n resolver: zodResolver(BankAccountFormSchema),\n defaultValues: { accountNumber: '', routingNumber: '' },\n })\n\n const onSubmit = async (data: BankAccountFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const { companyBankAccount } = await createBankAccount({\n //Account type is always checking for company bank accounts\n request: { companyId, requestBody: { ...payload, accountType: 'Checking' } },\n })\n\n await invalidateAllBankAccountsGet(queryClient)\n\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_CREATED, companyBankAccount)\n })\n }\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <BankAccountFormProvider value={{ isPending: isPendingCreate }}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </BankAccountFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\nBankAccountForm.Head = Head\nBankAccountForm.Form = Form\nBankAccountForm.Actions = Actions\n"],"names":["BankAccountForm","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","queryClient","useQueryClient","createBankAccount","isPendingCreate","useBankAccountsCreateMutation","control","methods","useForm","zodResolver","BankAccountFormSchema","onSubmit","data","payload","companyBankAccount","invalidateAllBankAccountsGet","componentEvents","FormProvider","HtmlForm","BankAccountFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;AAsBO,SAASA,EAAgBC,GAAsD;AAElF,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAkC;AACtE,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GACzCC,IAAcC,EAAe,GAE7B,EAAE,aAAaC,GAAmB,WAAWC,EAAA,IACjDC,EAA8B,GAE1B,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAYC,EAA+B;AAAA,IAC7D,UAAUC,EAAYC,CAAqB;AAAA,IAC3C,eAAe,EAAE,eAAe,IAAI,eAAe,GAAG;AAAA,EAAA,CACvD,GAEKC,IAAW,OAAOC,MAAgC;AAChD,UAAAb,EAAkBa,GAAM,OAAMC,MAAW;AAC7C,YAAM,EAAE,oBAAAC,MAAuB,MAAMX,EAAkB;AAAA;AAAA,QAErD,SAAS,EAAE,WAAAT,GAAW,aAAa,EAAE,GAAGmB,GAAS,aAAa,WAAa,EAAA;AAAA,MAAA,CAC5E;AAED,YAAME,EAA6Bd,CAAW,GAEtCH,EAAAkB,EAAgB,8BAA8BF,CAAkB;AAAA,IAAA,CACzE;AAAA,EACH;AACA,SACG,gBAAAvB,EAAA,WAAA,EAAQ,WAAAI,GACP,UAAA,gBAAAJ,EAAC0B,GAAc,EAAA,GAAGV,GAAS,SAAAD,GACzB,UAAC,gBAAAf,EAAA2B,GAAA,EAAS,UAAUX,EAAQ,aAAaI,CAAQ,GAC/C,UAAC,gBAAApB,EAAA4B,GAAA,EAAwB,OAAO,EAAE,WAAWf,EAC3C,GAAA,UAAA,gBAAAb,EAAC6B,GAAK,EAAA,eAAc,UAAS,KAAK,IAC/B,UAAAxB,KAIG,gBAAAyB,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAA/B,EAACgC,GAAK,EAAA;AAAA,sBACLC,GAAK,EAAA;AAAA,sBACLC,GAAQ,CAAA,CAAA;AAAA,EAAA,EAAA,CACX,EAEJ,CAAA,EAAA,CACF,EACF,CAAA,EAAA,CACF,EACF,CAAA;AAEJ;AACApC,EAAgB,OAAOkC;AACvBlC,EAAgB,OAAOmC;AACvBnC,EAAgB,UAAUoC;"}
@@ -5,14 +5,15 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
13
- const [A, B] = o("BankAccountContext");
14
+ const [B, C] = o("BankAccountContext");
14
15
  export {
15
- B as BankAccountFormProvider,
16
- A as useBankAccountForm
16
+ C as BankAccountFormProvider,
17
+ B as useBankAccountForm
17
18
  };
18
19
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAMA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,oBAAoB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAMA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,oBAAoB;"}
@@ -5,16 +5,17 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
13
- const [D, L] = t(
14
+ const [L, a] = t(
14
15
  "CompanyDocumentListContext"
15
16
  );
16
17
  export {
17
- L as DocumentListProvider,
18
- D as useDocumentList
18
+ a as DocumentListProvider,
19
+ L as useDocumentList
19
20
  };
20
21
  //# sourceMappingURL=useDocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n companyForms: FormSchema[]\n documentListError: Error | null\n handleRequestFormToSign: (form: FormSchema) => void\n handleChangeSignatory: () => void\n handleContinue: () => void\n isSelfSignatory: boolean\n signatory?: Signatory\n}\n\nconst [useDocumentList, DocumentListProvider] = createCompoundContext<DocumentListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAcM,MAAA,CAACA,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n companyForms: FormSchema[]\n documentListError: Error | null\n handleRequestFormToSign: (form: FormSchema) => void\n handleChangeSignatory: () => void\n handleContinue: () => void\n isSelfSignatory: boolean\n signatory?: Signatory\n}\n\nconst [useDocumentList, DocumentListProvider] = createCompoundContext<DocumentListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAcM,MAAA,CAACA,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -1,12 +1,10 @@
1
- import { DocumentList } from './documentSignerStateMachine';
2
- import { SignatureForm } from './SignatureForm';
3
1
  import { BaseComponentInterface } from '../../Base';
4
2
  export interface DocumentSignerProps extends BaseComponentInterface<'Company.DocumentList'> {
5
3
  companyId: string;
6
4
  signatoryId?: string;
7
5
  }
8
- export declare const DocumentSigner: {
9
- ({ companyId, signatoryId, onEvent, dictionary, }: DocumentSignerProps): import("react/jsx-runtime").JSX.Element;
10
- DocumentList: typeof DocumentList;
11
- SignatureForm: typeof SignatureForm;
12
- };
6
+ export declare function DocumentSigner(props: DocumentSignerProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare namespace DocumentSigner {
8
+ var DocumentList: typeof import("./documentSignerStateMachine").DocumentList;
9
+ var SignatureForm: typeof import("./SignatureForm").SignatureForm;
10
+ }
@@ -1,41 +1,41 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import { createMachine as p } from "robot3";
3
3
  import { useSignatoriesListSuspense as g } from "@gusto/embedded-api/react-query/signatoriesList";
4
4
  import { useMemo as f } from "react";
5
- import { DocumentList as n, AssignSignatory as S } from "./documentSignerStateMachine.js";
6
- import { documentSignerMachine as L } from "./stateMachine.js";
7
- import { Flow as D } from "../../Flow/Flow.js";
8
- import { useComponentDictionary as d } from "../../../i18n/I18n.js";
9
- import { SignatureForm as h } from "./SignatureForm/SignatureForm.js";
10
- const r = ({
11
- companyId: o,
12
- signatoryId: i,
13
- onEvent: e,
14
- dictionary: m
15
- }) => {
16
- d("Company.DocumentList", m);
5
+ import { DocumentList as r, AssignSignatory as S } from "./documentSignerStateMachine.js";
6
+ import { documentSignerMachine as D } from "./stateMachine.js";
7
+ import { Flow as L } from "../../Flow/Flow.js";
8
+ import { BaseComponent as d } from "../../Base/Base.js";
9
+ import "../../Base/useBase.js";
10
+ import { useComponentDictionary as h } from "../../../i18n/I18n.js";
11
+ import { SignatureForm as l } from "./SignatureForm/SignatureForm.js";
12
+ function x({ companyId: o, signatoryId: i, onEvent: m, dictionary: s }) {
13
+ h("Company.DocumentList", s);
17
14
  const {
18
- data: { signatoryList: s }
15
+ data: { signatoryList: c }
19
16
  } = g({
20
17
  companyUuid: o
21
- }), t = s.length > 0, c = f(
18
+ }), t = c.length > 0, u = f(
22
19
  () => p(
23
20
  t ? "documentList" : "index",
24
- L,
25
- (u) => ({
26
- ...u,
27
- component: t ? n : S,
21
+ D,
22
+ (a) => ({
23
+ ...a,
24
+ component: t ? r : S,
28
25
  companyId: o,
29
26
  signatoryId: i
30
27
  })
31
28
  ),
32
29
  [o, i, t]
33
30
  );
34
- return /* @__PURE__ */ a(D, { machine: c, onEvent: e });
35
- };
36
- r.DocumentList = n;
37
- r.SignatureForm = h;
31
+ return /* @__PURE__ */ n(L, { machine: u, onEvent: m });
32
+ }
33
+ function e(o) {
34
+ return /* @__PURE__ */ n(d, { ...o, children: /* @__PURE__ */ n(x, { ...o }) });
35
+ }
36
+ e.DocumentList = r;
37
+ e.SignatureForm = l;
38
38
  export {
39
- r as DocumentSigner
39
+ e as DocumentSigner
40
40
  };
41
41
  //# sourceMappingURL=DocumentSigner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Company/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { useMemo } from 'react'\nimport { AssignSignatory, DocumentList } from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport type { DocumentSignerContextInterface } from './useDocumentSigner'\nimport { SignatureForm } from './SignatureForm'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nexport const DocumentSigner = ({\n companyId,\n signatoryId,\n onEvent,\n dictionary,\n}: DocumentSignerProps) => {\n useComponentDictionary('Company.DocumentList', dictionary)\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n const doesSignatoryExist = signatories.length > 0\n\n const documentSigner = useMemo(\n () =>\n createMachine(\n doesSignatoryExist ? 'documentList' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: doesSignatoryExist ? DocumentList : AssignSignatory,\n companyId,\n signatoryId,\n }),\n ),\n [companyId, signatoryId, doesSignatoryExist],\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n\nDocumentSigner.DocumentList = DocumentList\nDocumentSigner.SignatureForm = SignatureForm\n"],"names":["DocumentSigner","companyId","signatoryId","onEvent","dictionary","useComponentDictionary","signatoryList","useSignatoriesListSuspense","doesSignatoryExist","documentSigner","useMemo","createMachine","documentSignerMachine","initialContext","DocumentList","AssignSignatory","jsx","Flow","SignatureForm"],"mappings":";;;;;;;;;AAgBO,MAAMA,IAAiB,CAAC;AAAA,EAC7B,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAA2B;AACzB,EAAAC,EAAuB,wBAAwBD,CAAU;AACnD,QAAA;AAAA,IACJ,MAAM,EAAE,eAAAE,EAAc;AAAA,MACpBC,EAA2B;AAAA,IAC7B,aAAaN;AAAA,EAAA,CACd,GAEKO,IADcF,EACmB,SAAS,GAE1CG,IAAiBC;AAAA,IACrB,MACEC;AAAA,MACEH,IAAqB,iBAAiB;AAAA,MACtCI;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWL,IAAqBM,IAAeC;AAAA,QAC/C,WAAAd;AAAA,QACA,aAAAC;AAAA,MACF;AAAA,IACF;AAAA,IACF,CAACD,GAAWC,GAAaM,CAAkB;AAAA,EAC7C;AACA,SAAQ,gBAAAQ,EAAAC,GAAA,EAAK,SAASR,GAAgB,SAAAN,EAAkB,CAAA;AAC1D;AAEAH,EAAe,eAAec;AAC9Bd,EAAe,gBAAgBkB;"}
1
+ {"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Company/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { useMemo } from 'react'\nimport { AssignSignatory, DocumentList } from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport type { DocumentSignerContextInterface } from './useDocumentSigner'\nimport { SignatureForm } from './SignatureForm'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nfunction DocumentSignerFlow({ companyId, signatoryId, onEvent, dictionary }: DocumentSignerProps) {\n useComponentDictionary('Company.DocumentList', dictionary)\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n const doesSignatoryExist = signatories.length > 0\n\n const documentSigner = useMemo(\n () =>\n createMachine(\n doesSignatoryExist ? 'documentList' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: doesSignatoryExist ? DocumentList : AssignSignatory,\n companyId,\n signatoryId,\n }),\n ),\n [companyId, signatoryId, doesSignatoryExist],\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <DocumentSignerFlow {...props} />\n </BaseComponent>\n )\n}\n\nDocumentSigner.DocumentList = DocumentList\nDocumentSigner.SignatureForm = SignatureForm\n"],"names":["DocumentSignerFlow","companyId","signatoryId","onEvent","dictionary","useComponentDictionary","signatoryList","useSignatoriesListSuspense","doesSignatoryExist","documentSigner","useMemo","createMachine","documentSignerMachine","initialContext","DocumentList","AssignSignatory","jsx","Flow","DocumentSigner","props","BaseComponent","SignatureForm"],"mappings":";;;;;;;;;;;AAgBA,SAASA,EAAmB,EAAE,WAAAC,GAAW,aAAAC,GAAa,SAAAC,GAAS,YAAAC,KAAmC;AAChG,EAAAC,EAAuB,wBAAwBD,CAAU;AACnD,QAAA;AAAA,IACJ,MAAM,EAAE,eAAAE,EAAc;AAAA,MACpBC,EAA2B;AAAA,IAC7B,aAAaN;AAAA,EAAA,CACd,GAEKO,IADcF,EACmB,SAAS,GAE1CG,IAAiBC;AAAA,IACrB,MACEC;AAAA,MACEH,IAAqB,iBAAiB;AAAA,MACtCI;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWL,IAAqBM,IAAeC;AAAA,QAC/C,WAAAd;AAAA,QACA,aAAAC;AAAA,MACF;AAAA,IACF;AAAA,IACF,CAACD,GAAWC,GAAaM,CAAkB;AAAA,EAC7C;AACA,SAAQ,gBAAAQ,EAAAC,GAAA,EAAK,SAASR,GAAgB,SAAAN,EAAkB,CAAA;AAC1D;AAEO,SAASe,EAAeC,GAA4B;AAEvD,SAAA,gBAAAH,EAACI,KAAe,GAAGD,GACjB,4BAACnB,GAAoB,EAAA,GAAGmB,GAAO,EACjC,CAAA;AAEJ;AAEAD,EAAe,eAAeJ;AAC9BI,EAAe,gBAAgBG;"}
@@ -5,16 +5,17 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
13
- const [F, S] = o(
14
+ const [S, c] = o(
14
15
  "CompanySignatureFormContext"
15
16
  );
16
17
  export {
17
- S as SignatureFormProvider,
18
- F as useSignatureForm
18
+ c as SignatureFormProvider,
19
+ S as useSignatureForm
19
20
  };
20
21
  //# sourceMappingURL=useSignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: FormSchema\n pdfUrl?: string | null\n isPending: boolean\n onBack: () => void\n}\n\nconst [useSignatureForm, SignatureFormProvider] = createCompoundContext<SignatureFormContextType>(\n 'CompanySignatureFormContext',\n)\n\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAUM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: FormSchema\n pdfUrl?: string | null\n isPending: boolean\n onBack: () => void\n}\n\nconst [useSignatureForm, SignatureFormProvider] = createCompoundContext<SignatureFormContextType>(\n 'CompanySignatureFormContext',\n)\n\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -7,22 +7,23 @@ import "react-i18next";
7
7
  import "@gusto/embedded-api/models/errors/apierror";
8
8
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
9
9
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
10
+ import "@tanstack/react-query";
10
11
  import "../../Base/useBase.js";
11
12
  import "../../../shared/constants.js";
12
13
  import "dompurify";
13
14
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
15
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
15
- const g = o.object({
16
+ const y = o.object({
16
17
  federalEin: o.string().optional(),
17
18
  taxPayerType: o.enum(Object.values(r)).optional(),
18
19
  filingForm: o.enum(Object.values(e)).optional(),
19
20
  legalName: o.string().min(1)
20
- }), [y, C] = t(
21
+ }), [C, b] = t(
21
22
  "CompanyFederalTaxesContext"
22
23
  );
23
24
  export {
24
- g as FederalTaxFormSchema,
25
- C as FederalTaxesProvider,
26
- y as useFederalTaxes
25
+ y as FederalTaxFormSchema,
26
+ b as FederalTaxesProvider,
27
+ C as useFederalTaxes
27
28
  };
28
29
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AASa,MAAAA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAS;AAAA,EACpF,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAS;AAAA,EAChF,WAAWF,EAAE,OAAO,EAAE,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AASa,MAAAA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAS;AAAA,EACpF,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAS;AAAA,EAChF,WAAWF,EAAE,OAAO,EAAE,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -5,20 +5,21 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../Base/useBase.js";
9
10
  import "../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
13
- const [a, c] = t("IndustryItems", {
14
+ const [c, A] = t("IndustryItems", {
14
15
  items: []
15
- }), [A, P] = t("IndustryApi", {
16
+ }), [P, f] = t("IndustryApi", {
16
17
  isPending: !1
17
18
  });
18
19
  export {
19
- P as IndustryApiStateProvider,
20
- c as IndustryItemsProvider,
21
- A as useIndustryApiState,
22
- a as useIndustryItems
20
+ f as IndustryApiStateProvider,
21
+ A as IndustryItemsProvider,
22
+ P as useIndustryApiState,
23
+ c as useIndustryItems
23
24
  };
24
25
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
@@ -5,16 +5,17 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
13
- const [x, F] = o(
14
+ const [F, d] = o(
14
15
  "CompanyDocumentFormContext"
15
16
  );
16
17
  export {
17
- F as LocationsFormProvider,
18
- x as useLocationsForm
18
+ d as LocationsFormProvider,
19
+ F as useLocationsForm
19
20
  };
20
21
  //# sourceMappingURL=useLocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAOM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAOM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -5,16 +5,17 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
13
- const [u, x] = o(
14
+ const [x, d] = o(
14
15
  "CompanyDocumentListContext"
15
16
  );
16
17
  export {
17
- x as LocationsListProvider,
18
- u as useLocationsList
18
+ d as LocationsListProvider,
19
+ x as useLocationsList
19
20
  };
20
21
  //# sourceMappingURL=useLocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n currentPage: number\n handleItemsPerPageChange: (n: number) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAiBM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n currentPage: number\n handleItemsPerPageChange: (n: number) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAiBM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -5,14 +5,15 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../Base/useBase.js";
9
10
  import "../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
13
- const [g, w] = o("OnboardingOverviewContext");
14
+ const [w, x] = o("OnboardingOverviewContext");
14
15
  export {
15
- w as OnboardingOverviewProvider,
16
- g as useOnboardingOverview
16
+ x as OnboardingOverviewProvider,
17
+ w as useOnboardingOverview
17
18
  };
18
19
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
@@ -6,12 +6,13 @@ import "react-i18next";
6
6
  import "@gusto/embedded-api/models/errors/apierror";
7
7
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
8
8
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
9
+ import "@tanstack/react-query";
9
10
  import "../../Base/useBase.js";
10
11
  import "../../../shared/constants.js";
11
12
  import "dompurify";
12
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
14
  import { createCompoundContext as e } from "../../Base/createCompoundContext.js";
14
- const P = o.object({
15
+ const s = o.object({
15
16
  frequency: o.enum(["Every week", "Every other week", "Twice per month", "Monthly"]),
16
17
  anchorPayDate: o.date().optional(),
17
18
  anchorEndOfPayPeriod: o.date().optional(),
@@ -20,10 +21,10 @@ const P = o.object({
20
21
  customName: o.string().optional(),
21
22
  customTwicePerMonth: o.string().optional(),
22
23
  payPeriodPreviewRange: o.number().optional()
23
- }), [s, w] = e("PayScheduleContext");
24
+ }), [w, x] = e("PayScheduleContext");
24
25
  export {
25
- w as PayScheduleProvider,
26
- P as PayScheduleSchema,
27
- s as usePaySchedule
26
+ x as PayScheduleProvider,
27
+ s as PayScheduleSchema,
28
+ w as usePaySchedule
28
29
  };
29
30
  //# sourceMappingURL=usePaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n payPeriodPreviewRange: z.number().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AA2Ba,MAAAA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAK,EAAE,SAAS;AAAA,EACjC,sBAAsBA,EAAE,KAAK,EAAE,SAAS;AAAA,EACxC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACzC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACzC,YAAYA,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,qBAAqBA,EAAE,OAAO,EAAE,SAAS;AAAA,EACzC,uBAAuBA,EAAE,OAAO,EAAE,SAAS;AAC7C,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
1
+ {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n payPeriodPreviewRange: z.number().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AA2Ba,MAAAA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAK,EAAE,SAAS;AAAA,EACjC,sBAAsBA,EAAE,KAAK,EAAE,SAAS;AAAA,EACxC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACzC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACzC,YAAYA,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,qBAAqBA,EAAE,OAAO,EAAE,SAAS;AAAA,EACzC,uBAAuBA,EAAE,OAAO,EAAE,SAAS;AAC7C,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
@@ -5,14 +5,15 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
13
- const [S, T] = t("StateTaxesFormContext");
14
+ const [T, c] = t("StateTaxesFormContext");
14
15
  export {
15
- T as StateTaxesFormProvider,
16
- S as useStateTaxesForm
16
+ c as StateTaxesFormProvider,
17
+ T as useStateTaxesForm
17
18
  };
18
19
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
@@ -5,14 +5,15 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
13
- const [S, T] = t("StateTaxesListContext");
14
+ const [T, c] = t("StateTaxesListContext");
14
15
  export {
15
- T as StateTaxesListProvider,
16
- S as useStateTaxesList
16
+ c as StateTaxesListProvider,
17
+ T as useStateTaxesList
17
18
  };
18
19
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
@@ -6,23 +6,24 @@ import "react-i18next";
6
6
  import "@gusto/embedded-api/models/errors/apierror";
7
7
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
8
8
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
9
+ import "@tanstack/react-query";
9
10
  import "../../Base/useBase.js";
10
11
  import "../../../shared/constants.js";
11
12
  import "dompurify";
12
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
14
  import { createCompoundContext as r } from "../../Base/createCompoundContext.js";
14
- const x = t.object({
15
+ const f = t.object({
15
16
  street1: t.string().min(1),
16
17
  street2: t.string().optional(),
17
18
  city: t.string().min(1),
18
19
  state: t.string().min(1),
19
20
  zip: t.string().min(1)
20
- }), [f, u] = r(
21
+ }), [u, z] = r(
21
22
  "ContractorAddressContext"
22
23
  );
23
24
  export {
24
- x as AddressFormSchema,
25
- u as AddressProvider,
26
- f as useAddress
25
+ f as AddressFormSchema,
26
+ z as AddressProvider,
27
+ u as useAddress
27
28
  };
28
29
  //# sourceMappingURL=useAddress.js.map