@gusto/embedded-react-sdk 0.8.2 → 0.9.0
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/CHANGELOG.md +9 -0
- package/dist/components/Common/DataView/DataCards/DataCards.js +21 -21
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js +28 -27
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +6 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +5 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +13 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +8 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +5 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +7 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +10 -10
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +29 -29
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Actions.d.ts +1 -0
- package/dist/components/Contractor/Address/Actions.js +13 -0
- package/dist/components/Contractor/Address/Actions.js.map +1 -0
- package/dist/components/Contractor/Address/Address.d.ts +16 -0
- package/dist/components/Contractor/Address/Address.js +74 -0
- package/dist/components/Contractor/Address/Address.js.map +1 -0
- package/dist/components/Contractor/Address/Form.d.ts +1 -0
- package/dist/components/Contractor/Address/Form.js +57 -0
- package/dist/components/Contractor/Address/Form.js.map +1 -0
- package/dist/components/Contractor/Address/Head.d.ts +1 -0
- package/dist/components/Contractor/Address/Head.js +15 -0
- package/dist/components/Contractor/Address/Head.js.map +1 -0
- package/dist/components/Contractor/Address/index.d.ts +2 -0
- package/dist/components/Contractor/Address/useAddress.d.ts +33 -0
- package/dist/components/Contractor/Address/useAddress.js +28 -0
- package/dist/components/Contractor/Address/useAddress.js.map +1 -0
- package/dist/components/Contractor/index.d.ts +2 -0
- package/dist/components/Contractor/index.js +5 -0
- package/dist/components/Contractor/index.js.map +1 -0
- package/dist/components/Employee/Compensation/Compensation.js +1 -1
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Deductions/useDeductions.js +8 -6
- package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +5 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +5 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +9 -9
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +2 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +5 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +10 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +92 -88
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +5 -3
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/Taxes/StateForm.js +1 -1
- package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +78 -75
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.d.ts +2 -2
- package/dist/components/Employee/Taxes/useTaxes.js +5 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/i18n/I18n.js +11 -11
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Address.json.js +35 -0
- package/dist/i18n/en/Contractor.Address.json.js.map +1 -0
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +6 -0
- package/dist/shared/constants.js +51 -45
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +20 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
- Added new Contractor.Address form component for managing contractor address information
|
|
6
|
+
- Improved ComboBox accessibility and added comprehensive component tests
|
|
7
|
+
- Added accessibility testing infrastructure with foundational component coverage
|
|
8
|
+
- Added accessibility tests to complex interactive and data components
|
|
9
|
+
- Fixed state tax boolean validation issues
|
|
10
|
+
- Updated Gusto embedded-api version to the latest
|
|
11
|
+
|
|
3
12
|
## 0.8.2
|
|
4
13
|
|
|
5
14
|
- Refactored employee flow components structure and improved organization within Employee namespace
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Flex as
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import a from "./DataCards.module.scss.js";
|
|
3
|
+
import { Flex as p } from "../../Flex/Flex.js";
|
|
4
4
|
import { useComponentContext as x } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
5
|
const D = ({
|
|
6
|
-
data:
|
|
7
|
-
columns:
|
|
8
|
-
itemMenu:
|
|
9
|
-
onSelect:
|
|
10
|
-
emptyState:
|
|
6
|
+
data: t,
|
|
7
|
+
columns: c,
|
|
8
|
+
itemMenu: d,
|
|
9
|
+
onSelect: n,
|
|
10
|
+
emptyState: o
|
|
11
11
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const s = x();
|
|
13
|
+
return /* @__PURE__ */ l("div", { role: "list", "data-testid": "data-cards", children: [
|
|
14
|
+
t.length === 0 && o && /* @__PURE__ */ e("div", { role: "listitem", children: /* @__PURE__ */ e(s.Card, { children: o() }) }),
|
|
15
|
+
t.map((i, m) => /* @__PURE__ */ e("div", { role: "listitem", children: /* @__PURE__ */ e(
|
|
16
|
+
s.Card,
|
|
17
17
|
{
|
|
18
|
-
menu:
|
|
19
|
-
onSelect:
|
|
20
|
-
|
|
18
|
+
menu: d && d(i),
|
|
19
|
+
onSelect: n ? (r) => {
|
|
20
|
+
n(i, r);
|
|
21
21
|
} : void 0,
|
|
22
|
-
children:
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
22
|
+
children: c.map((r, h) => /* @__PURE__ */ l(p, { flexDirection: "column", gap: 0, children: [
|
|
23
|
+
/* @__PURE__ */ e("h5", { className: a.columnTitle, children: r.title }),
|
|
24
|
+
/* @__PURE__ */ l("div", { className: a.columnData, children: [
|
|
25
25
|
" ",
|
|
26
|
-
r.render ? r.render(
|
|
26
|
+
r.render ? r.render(i) : String(i[r.key])
|
|
27
27
|
] })
|
|
28
|
-
] },
|
|
28
|
+
] }, h))
|
|
29
29
|
}
|
|
30
30
|
) }, m))
|
|
31
31
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataCards.js","sources":["../../../../../src/components/Common/DataView/DataCards/DataCards.tsx"],"sourcesContent":["import styles from './DataCards.module.scss'\nimport type { useDataViewPropReturn } from '@/components/Common/DataView/useDataView'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataCardsProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n}\n\nexport const DataCards = <T,>({\n data,\n columns,\n itemMenu,\n onSelect,\n emptyState,\n}: DataCardsProps<T>) => {\n const Components = useComponentContext()\n return (\n <div role=\"list\" data-testid=\"data-cards\">\n {data.length === 0 && <Components.Card>{emptyState
|
|
1
|
+
{"version":3,"file":"DataCards.js","sources":["../../../../../src/components/Common/DataView/DataCards/DataCards.tsx"],"sourcesContent":["import styles from './DataCards.module.scss'\nimport type { useDataViewPropReturn } from '@/components/Common/DataView/useDataView'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataCardsProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n}\n\nexport const DataCards = <T,>({\n data,\n columns,\n itemMenu,\n onSelect,\n emptyState,\n}: DataCardsProps<T>) => {\n const Components = useComponentContext()\n return (\n <div role=\"list\" data-testid=\"data-cards\">\n {data.length === 0 && emptyState && (\n <div role=\"listitem\">\n <Components.Card>{emptyState()}</Components.Card>\n </div>\n )}\n {data.map((item, index) => (\n <div role=\"listitem\" key={index}>\n <Components.Card\n menu={itemMenu && itemMenu(item)}\n onSelect={\n onSelect\n ? (checked: boolean) => {\n onSelect(item, checked)\n }\n : undefined\n }\n >\n {columns.map((column, index) => (\n <Flex key={index} flexDirection=\"column\" gap={0}>\n <h5 className={styles.columnTitle}>{column.title}</h5>\n <div className={styles.columnData}>\n {' '}\n {column.render ? column.render(item) : String(item[column.key as keyof T])}\n </div>\n </Flex>\n ))}\n </Components.Card>\n </div>\n ))}\n </div>\n )\n}\n"],"names":["DataCards","data","columns","itemMenu","onSelect","emptyState","Components","useComponentContext","jsxs","jsx","item","index","checked","column","Flex","styles"],"mappings":";;;;AAaO,MAAMA,IAAY,CAAK;AAAA,EAC5B,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,MAAyB;AACvB,QAAMC,IAAaC,EAAoB;AACvC,SACG,gBAAAC,EAAA,OAAA,EAAI,MAAK,QAAO,eAAY,cAC1B,UAAA;AAAA,IAAAP,EAAK,WAAW,KAAKI,KACpB,gBAAAI,EAAC,OAAI,EAAA,MAAK,YACR,UAAA,gBAAAA,EAACH,EAAW,MAAX,EAAiB,UAAAD,EAAA,EAAa,CAAA,GACjC;AAAA,IAEDJ,EAAK,IAAI,CAACS,GAAMC,MACd,gBAAAF,EAAA,OAAA,EAAI,MAAK,YACR,UAAA,gBAAAA;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAMH,KAAYA,EAASO,CAAI;AAAA,QAC/B,UACEN,IACI,CAACQ,MAAqB;AACpB,UAAAR,EAASM,GAAME,CAAO;AAAA,QAAA,IAExB;AAAA,QAGL,UAAAV,EAAQ,IAAI,CAACW,GAAQF,wBACnBG,GAAiB,EAAA,eAAc,UAAS,KAAK,GAC5C,UAAA;AAAA,UAAA,gBAAAL,EAAC,MAAG,EAAA,WAAWM,EAAO,aAAc,YAAO,OAAM;AAAA,UAChD,gBAAAP,EAAA,OAAA,EAAI,WAAWO,EAAO,YACpB,UAAA;AAAA,YAAA;AAAA,YACAF,EAAO,SAASA,EAAO,OAAOH,CAAI,IAAI,OAAOA,EAAKG,EAAO,GAAc,CAAC;AAAA,UAAA,EAC3E,CAAA;AAAA,QAAA,EAAA,GALSF,CAMX,CACD;AAAA,MAAA;AAAA,IACH,EAAA,GApBwBA,CAqB1B,CACD;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ComboBox as
|
|
1
|
+
import { jsx as o, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { ComboBox as A, Input as F, Button as j, Popover as D, ListBox as E, ListBoxItem as P } from "react-aria-components";
|
|
3
3
|
import { useTranslation as z } from "react-i18next";
|
|
4
4
|
import { useMemo as H } from "react";
|
|
5
5
|
import d from "classnames";
|
|
@@ -10,14 +10,14 @@ import { useTheme as U } from "../../../../contexts/ThemeProvider/useTheme.js";
|
|
|
10
10
|
/* empty css */
|
|
11
11
|
import _ from "../../../../assets/icons/alert-circle.svg.js";
|
|
12
12
|
import $ from "../../../../assets/icons/caret-down.svg.js";
|
|
13
|
-
const
|
|
13
|
+
const rr = ({
|
|
14
14
|
className: p,
|
|
15
15
|
description: i,
|
|
16
16
|
errorMessage: m,
|
|
17
17
|
id: f,
|
|
18
|
-
isDisabled:
|
|
18
|
+
isDisabled: u,
|
|
19
19
|
isInvalid: a,
|
|
20
|
-
isRequired:
|
|
20
|
+
isRequired: h,
|
|
21
21
|
label: s,
|
|
22
22
|
onChange: x,
|
|
23
23
|
onBlur: B,
|
|
@@ -25,57 +25,58 @@ const oo = ({
|
|
|
25
25
|
placeholder: b,
|
|
26
26
|
value: c,
|
|
27
27
|
inputRef: C,
|
|
28
|
-
shouldVisuallyHideLabel:
|
|
28
|
+
shouldVisuallyHideLabel: g,
|
|
29
29
|
name: v,
|
|
30
|
-
...
|
|
30
|
+
...I
|
|
31
31
|
}) => {
|
|
32
|
-
const { t:
|
|
32
|
+
const { t: N } = z(), { inputId: l, errorMessageId: S, descriptionId: y, ariaDescribedBy: L } = K({
|
|
33
33
|
inputId: f,
|
|
34
34
|
errorMessage: m,
|
|
35
35
|
description: i
|
|
36
|
-
}), { container:
|
|
37
|
-
return /* @__PURE__ */
|
|
36
|
+
}), { container: T } = U(), w = H(() => n.map((r) => ({ name: r.label, id: r.value })), [n]);
|
|
37
|
+
return /* @__PURE__ */ o(
|
|
38
38
|
M,
|
|
39
39
|
{
|
|
40
40
|
label: s,
|
|
41
41
|
htmlFor: l,
|
|
42
42
|
errorMessage: m,
|
|
43
|
-
errorMessageId:
|
|
43
|
+
errorMessageId: S,
|
|
44
44
|
descriptionId: y,
|
|
45
|
-
isRequired:
|
|
45
|
+
isRequired: h,
|
|
46
46
|
description: i,
|
|
47
|
-
shouldVisuallyHideLabel:
|
|
47
|
+
shouldVisuallyHideLabel: g,
|
|
48
48
|
className: d(t.root, p),
|
|
49
49
|
withErrorIcon: !1,
|
|
50
50
|
children: /* @__PURE__ */ e(
|
|
51
|
-
|
|
51
|
+
A,
|
|
52
52
|
{
|
|
53
53
|
"aria-label": s,
|
|
54
54
|
"aria-describedby": L,
|
|
55
55
|
className: "react-aria-ComboBox-root",
|
|
56
|
-
isDisabled:
|
|
56
|
+
isDisabled: u,
|
|
57
57
|
isInvalid: a,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
menuTrigger: "focus",
|
|
59
|
+
onSelectionChange: (r) => {
|
|
60
|
+
r && x?.(r.toString());
|
|
60
61
|
},
|
|
61
62
|
id: l,
|
|
62
63
|
selectedKey: c || void 0,
|
|
63
64
|
name: v,
|
|
64
65
|
children: [
|
|
65
|
-
/* @__PURE__ */ e(
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */ e("div", { "aria-hidden": "true", className: t.icons, children: [
|
|
68
|
-
a && /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
] })
|
|
66
|
+
/* @__PURE__ */ e("div", { children: [
|
|
67
|
+
/* @__PURE__ */ o(F, { ref: C, placeholder: b, onBlur: B, ...I }),
|
|
68
|
+
/* @__PURE__ */ o(j, { children: /* @__PURE__ */ e("div", { "aria-hidden": "true", className: t.icons, children: [
|
|
69
|
+
a && /* @__PURE__ */ o(_, { fontSize: 16 }),
|
|
70
|
+
/* @__PURE__ */ o($, { title: N("icons.selectArrow") })
|
|
71
|
+
] }) })
|
|
71
72
|
] }),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ o(
|
|
73
74
|
D,
|
|
74
75
|
{
|
|
75
76
|
className: d(t.popover, "react-aria-Popover"),
|
|
76
|
-
UNSTABLE_portalContainer:
|
|
77
|
+
UNSTABLE_portalContainer: T.current,
|
|
77
78
|
maxHeight: 320,
|
|
78
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ o(E, { items: w, children: (r) => /* @__PURE__ */ o(P, { children: r.name }, r.id) })
|
|
79
80
|
}
|
|
80
81
|
)
|
|
81
82
|
]
|
|
@@ -85,6 +86,6 @@ const oo = ({
|
|
|
85
86
|
);
|
|
86
87
|
};
|
|
87
88
|
export {
|
|
88
|
-
|
|
89
|
+
rr as ComboBox
|
|
89
90
|
};
|
|
90
91
|
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/components/Common/UI/ComboBox/ComboBox.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n Popover,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './ComboBox.module.scss'\nimport type { ComboBoxProps } from './ComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport const ComboBox = ({\n className,\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n inputRef,\n shouldVisuallyHideLabel,\n name,\n ...props\n}: ComboBoxProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n const items = useMemo(() => {\n return options.map(option => ({ name: option.label, id: option.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n id={inputId}\n selectedKey={value ? (value as Key) : undefined}\n name={name}\n >\n <
|
|
1
|
+
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/components/Common/UI/ComboBox/ComboBox.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n Popover,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './ComboBox.module.scss'\nimport type { ComboBoxProps } from './ComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport const ComboBox = ({\n className,\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n inputRef,\n shouldVisuallyHideLabel,\n name,\n ...props\n}: ComboBoxProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n const items = useMemo(() => {\n return options.map(option => ({ name: option.label, id: option.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n menuTrigger=\"focus\"\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n id={inputId}\n selectedKey={value ? (value as Key) : undefined}\n name={name}\n >\n <div>\n <Input ref={inputRef} placeholder={placeholder} onBlur={onBlur} {...props} />\n <Button>\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n </div>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n maxHeight={320}\n >\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n )\n}\n"],"names":["ComboBox","className","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","inputRef","shouldVisuallyHideLabel","name","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","items","useMemo","option","jsx","FieldLayout","classNames","styles","jsxs","AriaComboBox","key","Input","Button","AlertCircle","CaretDown","Popover","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAAW,CAAC;AAAA,EACvB,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AACb,QAAA,EAAE,GAAAC,EAAE,IAAIC,EAAe,GACvB,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASpB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GACK,EAAE,WAAAuB,EAAU,IAAIC,EAAS,GAEzBC,IAAQC,EAAQ,MACbjB,EAAQ,IAAI,CAAAkB,OAAW,EAAE,MAAMA,EAAO,OAAO,IAAIA,EAAO,MAAQ,EAAA,GACtE,CAAClB,CAAO,CAAC;AAGV,SAAA,gBAAAmB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAvB;AAAA,MACA,SAASY;AAAA,MACT,cAAAjB;AAAA,MACA,gBAAAkB;AAAA,MACA,eAAAC;AAAA,MACA,YAAAf;AAAA,MACA,aAAAL;AAAA,MACA,yBAAAa;AAAA,MACA,WAAWiB,EAAWC,EAAO,MAAMhC,CAAS;AAAA,MAC5C,eAAe;AAAA,MAEf,UAAA,gBAAAiC;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,cAAY3B;AAAA,UACZ,oBAAkBe;AAAA,UAClB,WAAW;AAAA,UACX,YAAAlB;AAAA,UACA,WAAAC;AAAA,UACA,aAAY;AAAA,UACZ,mBAAmB,CAAO8B,MAAA;AACxB,YAAIA,KACS3B,IAAA2B,EAAI,UAAU;AAAA,UAE7B;AAAA,UACA,IAAIhB;AAAA,UACJ,aAAaP,KAAyB;AAAA,UACtC,MAAAG;AAAA,UAEA,UAAA;AAAA,YAAA,gBAAAkB,EAAC,OACC,EAAA,UAAA;AAAA,cAAA,gBAAAJ,EAACO,KAAM,KAAKvB,GAAU,aAAAF,GAA0B,QAAAF,GAAiB,GAAGO,GAAO;AAAA,cAC3E,gBAAAa,EAACQ,KACC,UAAC,gBAAAJ,EAAA,OAAA,EAAI,eAAY,QAAO,WAAWD,EAAO,OACvC,UAAA;AAAA,gBAAa3B,KAAA,gBAAAwB,EAACS,GAAY,EAAA,UAAU,GAAI,CAAA;AAAA,gBACxC,gBAAAT,EAAAU,GAAA,EAAU,OAAOtB,EAAE,mBAAmB,EAAG,CAAA;AAAA,cAAA,EAAA,CAC5C,EACF,CAAA;AAAA,YAAA,GACF;AAAA,YAEA,gBAAAY;AAAA,cAACW;AAAA,cAAA;AAAA,gBACC,WAAWT,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BR,EAAU;AAAA,gBACpC,WAAW;AAAA,gBAEX,UAAA,gBAAAK,EAACY,GAAQ,EAAA,OAAAf,GACN,UAAQ,CAAAgB,MAAA,gBAAAb,EAACc,KAA2B,UAAKD,EAAA,KAAA,GAAfA,EAAK,EAAe,EACjD,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_root_b0bgq_1", s = "_icons_b0bgq_70", t = "_popover_b0bgq_81", _ = {
|
|
2
2
|
root: o,
|
|
3
|
-
icons:
|
|
4
|
-
popover:
|
|
3
|
+
icons: s,
|
|
4
|
+
popover: t
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
_ as default,
|
|
8
|
+
s as icons,
|
|
9
|
+
t as popover,
|
|
10
10
|
o as root
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=ComboBox.module.scss.js.map
|
|
@@ -6,11 +6,13 @@ 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
8
|
import "../../../Base/useBase.js";
|
|
9
|
+
import "../../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
11
|
-
const [
|
|
13
|
+
const [S, c] = t("CreateSignatoryContext");
|
|
12
14
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
c as CreateSignatoryProvider,
|
|
16
|
+
S as useCreateSignatory
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=useCreateSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport { useCreateSignatory, CreateSignatoryProvider }\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport { useCreateSignatory, CreateSignatoryProvider }\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAkBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -6,11 +6,13 @@ 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
8
|
import "../../../Base/useBase.js";
|
|
9
|
+
import "../../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
11
|
-
const [
|
|
13
|
+
const [C, I] = t("InviteSignatoryContext");
|
|
12
14
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
I as InviteSignatoryProvider,
|
|
16
|
+
C as useInviteSignatory
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=useInviteSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAcA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -6,15 +6,17 @@ 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
8
|
import "../../Base/useBase.js";
|
|
9
|
+
import "../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
11
|
-
const
|
|
13
|
+
const c = {
|
|
12
14
|
createSignatory: "createSignatory",
|
|
13
15
|
inviteSignatory: "inviteSignatory"
|
|
14
|
-
}, [
|
|
16
|
+
}, [A, d] = t("AssignSignatoryContext");
|
|
15
17
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
d as AssignSignatoryProvider,
|
|
19
|
+
c as SignatoryAssignmentMode,
|
|
20
|
+
A as useAssignSignatory
|
|
19
21
|
};
|
|
20
22
|
//# sourceMappingURL=useAssignSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAMO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GAeM,CAACC,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -6,11 +6,13 @@ 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
8
|
import "../../../Base/useBase.js";
|
|
9
|
+
import "../../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
11
|
-
const [
|
|
13
|
+
const [A, B] = o("BankAccountContext");
|
|
12
14
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
B as BankAccountFormProvider,
|
|
16
|
+
A as useBankAccountForm
|
|
15
17
|
};
|
|
16
18
|
//# 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":"
|
|
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;"}
|
|
@@ -6,13 +6,15 @@ 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
8
|
import "../../../Base/useBase.js";
|
|
9
|
+
import "../../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
11
|
-
const [
|
|
13
|
+
const [D, L] = t(
|
|
12
14
|
"CompanyDocumentListContext"
|
|
13
15
|
);
|
|
14
16
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
L as DocumentListProvider,
|
|
18
|
+
D as useDocumentList
|
|
17
19
|
};
|
|
18
20
|
//# 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":"
|
|
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;"}
|
|
@@ -6,13 +6,15 @@ 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
8
|
import "../../../Base/useBase.js";
|
|
9
|
+
import "../../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
11
|
-
const [
|
|
13
|
+
const [F, S] = o(
|
|
12
14
|
"CompanySignatureFormContext"
|
|
13
15
|
);
|
|
14
16
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
S as SignatureFormProvider,
|
|
18
|
+
F as useSignatureForm
|
|
17
19
|
};
|
|
18
20
|
//# 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":"
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { z as
|
|
2
|
-
import { FilingForm as
|
|
1
|
+
import { z as o } from "zod";
|
|
2
|
+
import { FilingForm as e, TaxPayerType as r } from "@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-error-boundary";
|
|
@@ -8,19 +8,21 @@ 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
10
|
import "../../Base/useBase.js";
|
|
11
|
+
import "../../../shared/constants.js";
|
|
11
12
|
import "dompurify";
|
|
13
|
+
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
14
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
13
|
-
const
|
|
14
|
-
federalEin:
|
|
15
|
-
taxPayerType:
|
|
16
|
-
filingForm:
|
|
17
|
-
legalName:
|
|
18
|
-
}), [
|
|
15
|
+
const g = o.object({
|
|
16
|
+
federalEin: o.string().optional(),
|
|
17
|
+
taxPayerType: o.enum(Object.values(r)).optional(),
|
|
18
|
+
filingForm: o.enum(Object.values(e)).optional(),
|
|
19
|
+
legalName: o.string().min(1)
|
|
20
|
+
}), [y, C] = t(
|
|
19
21
|
"CompanyFederalTaxesContext"
|
|
20
22
|
);
|
|
21
23
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
g as FederalTaxFormSchema,
|
|
25
|
+
C as FederalTaxesProvider,
|
|
26
|
+
y as useFederalTaxes
|
|
25
27
|
};
|
|
26
28
|
//# 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":"
|
|
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;"}
|
|
@@ -6,17 +6,19 @@ 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
8
|
import "../../Base/useBase.js";
|
|
9
|
+
import "../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
11
|
-
const [
|
|
13
|
+
const [a, c] = t("IndustryItems", {
|
|
12
14
|
items: []
|
|
13
|
-
}), [
|
|
15
|
+
}), [A, P] = t("IndustryApi", {
|
|
14
16
|
isPending: !1
|
|
15
17
|
});
|
|
16
18
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
P as IndustryApiStateProvider,
|
|
20
|
+
c as IndustryItemsProvider,
|
|
21
|
+
A as useIndustryApiState,
|
|
22
|
+
a as useIndustryItems
|
|
21
23
|
};
|
|
22
24
|
//# 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":"
|
|
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;"}
|
|
@@ -6,13 +6,15 @@ 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
8
|
import "../../../Base/useBase.js";
|
|
9
|
+
import "../../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
11
|
-
const [
|
|
13
|
+
const [x, F] = o(
|
|
12
14
|
"CompanyDocumentFormContext"
|
|
13
15
|
);
|
|
14
16
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
F as LocationsFormProvider,
|
|
18
|
+
x as useLocationsForm
|
|
17
19
|
};
|
|
18
20
|
//# 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":"
|
|
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;"}
|
|
@@ -6,13 +6,15 @@ 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
8
|
import "../../../Base/useBase.js";
|
|
9
|
+
import "../../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
11
|
-
const [
|
|
13
|
+
const [u, x] = o(
|
|
12
14
|
"CompanyDocumentListContext"
|
|
13
15
|
);
|
|
14
16
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
x as LocationsListProvider,
|
|
18
|
+
u as useLocationsList
|
|
17
19
|
};
|
|
18
20
|
//# 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":"
|
|
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;"}
|
|
@@ -6,11 +6,13 @@ 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
8
|
import "../../Base/useBase.js";
|
|
9
|
+
import "../../../shared/constants.js";
|
|
9
10
|
import "dompurify";
|
|
11
|
+
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
12
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
11
|
-
const [
|
|
13
|
+
const [g, w] = o("OnboardingOverviewContext");
|
|
12
14
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
w as OnboardingOverviewProvider,
|
|
16
|
+
g as useOnboardingOverview
|
|
15
17
|
};
|
|
16
18
|
//# 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":"
|
|
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;"}
|