@gusto/embedded-react-sdk 0.35.0-rc.2 → 0.35.0-rc.3
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import h from "classnames";
|
|
3
|
-
import { Flex as u } from "../../Flex/Flex.js";
|
|
4
3
|
import { BreadcrumbsDefaults as k } from "./BreadcrumbsTypes.js";
|
|
5
4
|
import r from "./Breadcrumbs.module.scss.js";
|
|
6
5
|
import { applyMissingDefaults as x } from "../../../../helpers/applyMissingDefaults.js";
|
|
6
|
+
import { Flex as u } from "../../Flex/Flex.js";
|
|
7
7
|
function I(p) {
|
|
8
8
|
const f = x(p, k), {
|
|
9
9
|
className: s,
|
|
@@ -7,13 +7,13 @@ import { FileInputDefaults as K } from "./FileInputTypes.js";
|
|
|
7
7
|
import n from "./FileInput.module.scss.js";
|
|
8
8
|
import { applyMissingDefaults as L } from "../../../../helpers/applyMissingDefaults.js";
|
|
9
9
|
import { FieldLayout as O } from "../../FieldLayout/FieldLayout.js";
|
|
10
|
-
import { Flex as y } from "../../Flex/Flex.js";
|
|
11
10
|
import { ButtonIcon as R } from "../Button/ButtonIcon.js";
|
|
12
11
|
import W from "../../../../assets/icons/icon-trashcan.svg.js";
|
|
13
12
|
import Z from "../../../../assets/icons/icon-file-outline.svg.js";
|
|
14
13
|
import $ from "../../../../assets/icons/icon-file-pdf.svg.js";
|
|
15
14
|
import H from "../../../../assets/icons/icon-file-png.svg.js";
|
|
16
15
|
import V from "../../../../assets/icons/icon-file-jpg.svg.js";
|
|
16
|
+
import { Flex as y } from "../../Flex/Flex.js";
|
|
17
17
|
function Q(i) {
|
|
18
18
|
return i === "application/pdf" ? $ : i === "image/png" ? H : i === "image/jpeg" || i === "image/jpg" ? V : Z;
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import c from "classnames";
|
|
3
|
-
import
|
|
4
|
-
import p from "
|
|
3
|
+
import n from "./ProgressBar.module.scss.js";
|
|
4
|
+
import { Flex as p } from "../../Flex/Flex.js";
|
|
5
5
|
import { VisuallyHidden as d } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
6
6
|
function y({
|
|
7
7
|
className: i,
|
|
@@ -13,9 +13,9 @@ function y({
|
|
|
13
13
|
const s = Math.max(1, Math.min(m, e)), l = {
|
|
14
14
|
"--g-progress-bar-width": `${s * 100 / e}%`
|
|
15
15
|
};
|
|
16
|
-
return /* @__PURE__ */ t(
|
|
16
|
+
return /* @__PURE__ */ t(p, { flexDirection: "column", children: [
|
|
17
17
|
o && /* @__PURE__ */ r(o, {}),
|
|
18
|
-
/* @__PURE__ */ r("div", { className: c(
|
|
18
|
+
/* @__PURE__ */ r("div", { className: c(n.root, i), style: l, children: /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("progress", { "aria-label": a, value: s, max: e }) }) })
|
|
19
19
|
] });
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
@@ -6,15 +6,15 @@ import { useComponentContext as D } from "../../../contexts/ComponentAdapter/use
|
|
|
6
6
|
import { useI18n as I } from "../../../i18n/I18n.js";
|
|
7
7
|
import { Form as O } from "../../Common/Form/Form.js";
|
|
8
8
|
import { Grid as n } from "../../Common/Grid/Grid.js";
|
|
9
|
-
import { Flex as x } from "../../Common/Flex/Flex.js";
|
|
10
9
|
import { TextInputField as l } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
11
|
-
import { NumberInputField as
|
|
10
|
+
import { NumberInputField as x } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
12
11
|
import { RadioGroupField as d } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
13
|
-
import { SwitchField as
|
|
14
|
-
import { DatePickerField as
|
|
15
|
-
import { usePlaceholderSSN as
|
|
16
|
-
import { usePlaceholderEin as
|
|
17
|
-
import { ContractorOnboardingStatus as
|
|
12
|
+
import { SwitchField as w } from "../../Common/Fields/SwitchField/SwitchField.js";
|
|
13
|
+
import { DatePickerField as E } from "../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
14
|
+
import { usePlaceholderSSN as j, normalizeSSN as v } from "../../../helpers/ssn.js";
|
|
15
|
+
import { usePlaceholderEin as G, normalizeEin as z } from "../../../helpers/federalEin.js";
|
|
16
|
+
import { ContractorOnboardingStatus as A } from "../../../shared/constants.js";
|
|
17
|
+
import { Flex as B } from "../../Common/Flex/Flex.js";
|
|
18
18
|
function re({
|
|
19
19
|
formMethods: u,
|
|
20
20
|
handleSubmit: f,
|
|
@@ -33,7 +33,7 @@ function re({
|
|
|
33
33
|
}) {
|
|
34
34
|
const a = D();
|
|
35
35
|
I("Contractor.Profile");
|
|
36
|
-
const { t: e } = T("Contractor.Profile"), q =
|
|
36
|
+
const { t: e } = T("Contractor.Profile"), q = j(t?.hasSsn ?? !1), P = G(t?.hasEin ?? !1);
|
|
37
37
|
return /* @__PURE__ */ i("section", { className: F, children: /* @__PURE__ */ i(S, { ...u, children: /* @__PURE__ */ r(O, { onSubmit: f, children: [
|
|
38
38
|
/* @__PURE__ */ r(n, { gridTemplateColumns: "1fr", gap: 24, className: "mb-8", children: [
|
|
39
39
|
/* @__PURE__ */ r("header", { children: [
|
|
@@ -42,12 +42,12 @@ function re({
|
|
|
42
42
|
] }),
|
|
43
43
|
/* @__PURE__ */ i("div", { className: C.switchFieldContainer, children: /* @__PURE__ */ r(n, { gap: 16, children: [
|
|
44
44
|
/* @__PURE__ */ i(
|
|
45
|
-
|
|
45
|
+
w,
|
|
46
46
|
{
|
|
47
47
|
name: "selfOnboarding",
|
|
48
48
|
label: e("fields.selfOnboarding.label"),
|
|
49
49
|
description: e("fields.selfOnboarding.description"),
|
|
50
|
-
isDisabled: t && t.onboardingStatus !==
|
|
50
|
+
isDisabled: t && t.onboardingStatus !== A.ADMIN_ONBOARDING_INCOMPLETE
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
53
|
p && /* @__PURE__ */ i(
|
|
@@ -81,7 +81,7 @@ function re({
|
|
|
81
81
|
name: "ssn",
|
|
82
82
|
label: e("fields.ssn.label"),
|
|
83
83
|
placeholder: q,
|
|
84
|
-
transform:
|
|
84
|
+
transform: v,
|
|
85
85
|
isRequired: !0
|
|
86
86
|
}
|
|
87
87
|
)
|
|
@@ -101,7 +101,7 @@ function re({
|
|
|
101
101
|
name: "ein",
|
|
102
102
|
label: e("fields.ein.label"),
|
|
103
103
|
placeholder: P,
|
|
104
|
-
transform:
|
|
104
|
+
transform: z,
|
|
105
105
|
isRequired: !0
|
|
106
106
|
}
|
|
107
107
|
)
|
|
@@ -116,7 +116,7 @@ function re({
|
|
|
116
116
|
}
|
|
117
117
|
),
|
|
118
118
|
h && /* @__PURE__ */ i(
|
|
119
|
-
|
|
119
|
+
x,
|
|
120
120
|
{
|
|
121
121
|
name: "hourlyRate",
|
|
122
122
|
label: e("fields.hourlyRate.label"),
|
|
@@ -126,7 +126,7 @@ function re({
|
|
|
126
126
|
}
|
|
127
127
|
),
|
|
128
128
|
/* @__PURE__ */ i(
|
|
129
|
-
|
|
129
|
+
E,
|
|
130
130
|
{
|
|
131
131
|
name: "startDate",
|
|
132
132
|
label: e("fields.startDate.label"),
|
|
@@ -135,7 +135,7 @@ function re({
|
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
] }),
|
|
138
|
-
/* @__PURE__ */ i(
|
|
138
|
+
/* @__PURE__ */ i(B, { gap: 12, justifyContent: "flex-end", children: /* @__PURE__ */ i(a.Button, { type: "submit", variant: "primary", isDisabled: o.isSubmitting, children: o.isSubmitting ? e(s ? "buttons.updating" : "buttons.creating") : e(s ? "buttons.update" : "buttons.create") }) })
|
|
139
139
|
] }) }) });
|
|
140
140
|
}
|
|
141
141
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gusto/embedded-react-sdk",
|
|
3
|
-
"version": "0.35.0-rc.
|
|
3
|
+
"version": "0.35.0-rc.3",
|
|
4
4
|
"homepage": "https://github.com/Gusto/embedded-react-sdk",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/Gusto/embedded-react-sdk/issues"
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"deepmerge": "^4.3.1",
|
|
151
151
|
"dompurify": "^3.3.3",
|
|
152
152
|
"i18next": "^25.8.18",
|
|
153
|
-
"react-aria": "3.
|
|
153
|
+
"react-aria": "^3.44.0",
|
|
154
154
|
"react-aria-components": "1.13.0",
|
|
155
155
|
"react-error-boundary": "^6.1.1",
|
|
156
156
|
"react-hook-form": "^7.71.2",
|