@aclymatepackages/modules 4.1.4 → 4.1.5
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.
|
@@ -27,11 +27,12 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
27
27
|
const CompanyOnboardingInput = _ref => {
|
|
28
28
|
let {
|
|
29
29
|
appCheckToken,
|
|
30
|
-
companyName,
|
|
30
|
+
companyName = "",
|
|
31
31
|
header,
|
|
32
32
|
onFormComplete,
|
|
33
33
|
PlacesAutocomplete,
|
|
34
|
-
theme
|
|
34
|
+
theme,
|
|
35
|
+
websiteInput
|
|
35
36
|
} = _ref;
|
|
36
37
|
const [inputData, setInputData] = (0, _react.useState)({
|
|
37
38
|
name: companyName
|
|
@@ -42,10 +43,26 @@ const CompanyOnboardingInput = _ref => {
|
|
|
42
43
|
industry,
|
|
43
44
|
employeeCount,
|
|
44
45
|
isRemote,
|
|
45
|
-
name
|
|
46
|
+
name,
|
|
47
|
+
username,
|
|
48
|
+
email
|
|
46
49
|
} = inputData;
|
|
47
50
|
const PlacesAutocompleteComponent = PlacesAutocomplete || _PlacesAutocomplete.default;
|
|
48
|
-
const
|
|
51
|
+
const nameInputArray = websiteInput ? [{
|
|
52
|
+
label: "What is your company's name?",
|
|
53
|
+
value: name,
|
|
54
|
+
editData: editInputData("name")
|
|
55
|
+
}] : [];
|
|
56
|
+
const userInfoArray = websiteInput ? [{
|
|
57
|
+
label: "What is your name?",
|
|
58
|
+
value: username,
|
|
59
|
+
editData: editInputData("username")
|
|
60
|
+
}, {
|
|
61
|
+
label: "What is your email address?",
|
|
62
|
+
value: email,
|
|
63
|
+
editData: editInputData("email")
|
|
64
|
+
}] : [];
|
|
65
|
+
const nonPeopleDataLabsCompanyInputs = [...nameInputArray, {
|
|
49
66
|
label: "How many employees work for your company?",
|
|
50
67
|
value: employeeCount,
|
|
51
68
|
editData: editInputData("employeeCount"),
|
|
@@ -77,8 +94,8 @@ const CompanyOnboardingInput = _ref => {
|
|
|
77
94
|
setValue: editInputData("isRemote"),
|
|
78
95
|
lightBackground: true
|
|
79
96
|
}),
|
|
80
|
-
onNextStep: () => onFormComplete(inputData)
|
|
81
|
-
}];
|
|
97
|
+
onNextStep: !websiteInput && (() => onFormComplete(inputData))
|
|
98
|
+
}, ...userInfoArray];
|
|
82
99
|
const formInputArray = nonPeopleDataLabsCompanyInputs.map(input => _objectSpread(_objectSpread({}, input), {}, {
|
|
83
100
|
form: "onboarding"
|
|
84
101
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aclymatepackages/modules",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.5",
|
|
4
4
|
"description": "Aclymate modules",
|
|
5
5
|
"author": "William Loopesko",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"@aclymatepackages/multi-part-form": "^2.0.1",
|
|
17
17
|
"@aclymatepackages/other-helpers": "^1.0.9",
|
|
18
18
|
"@aclymatepackages/reg-exp": "^1.0.0",
|
|
19
|
-
"@aclymatepackages/subcategories": "^4.
|
|
20
|
-
"@aclymatepackages/themes": "^4.
|
|
19
|
+
"@aclymatepackages/subcategories": "^4.1.2",
|
|
20
|
+
"@aclymatepackages/themes": "^4.1.0",
|
|
21
21
|
"@babel/preset-react": "^7.16.7",
|
|
22
22
|
"@emotion/react": "^11.11.1",
|
|
23
23
|
"@emotion/styled": "^11.11.0",
|
|
@@ -14,23 +14,51 @@ import PlacesAutocompleteModule from "./PlacesAutocomplete";
|
|
|
14
14
|
|
|
15
15
|
const CompanyOnboardingInput = ({
|
|
16
16
|
appCheckToken,
|
|
17
|
-
companyName,
|
|
17
|
+
companyName = "",
|
|
18
18
|
header,
|
|
19
19
|
onFormComplete,
|
|
20
20
|
PlacesAutocomplete,
|
|
21
21
|
theme,
|
|
22
|
+
websiteInput,
|
|
22
23
|
}) => {
|
|
23
24
|
const [inputData, setInputData] = useState({ name: companyName });
|
|
24
25
|
|
|
25
26
|
const editInputData = (field) => (value) =>
|
|
26
27
|
editObjectData(setInputData, field, value);
|
|
27
28
|
|
|
28
|
-
const { location, industry, employeeCount, isRemote, name } =
|
|
29
|
+
const { location, industry, employeeCount, isRemote, name, username, email } =
|
|
30
|
+
inputData;
|
|
29
31
|
|
|
30
32
|
const PlacesAutocompleteComponent =
|
|
31
33
|
PlacesAutocomplete || PlacesAutocompleteModule;
|
|
32
34
|
|
|
35
|
+
const nameInputArray = websiteInput
|
|
36
|
+
? [
|
|
37
|
+
{
|
|
38
|
+
label: "What is your company's name?",
|
|
39
|
+
value: name,
|
|
40
|
+
editData: editInputData("name"),
|
|
41
|
+
},
|
|
42
|
+
]
|
|
43
|
+
: [];
|
|
44
|
+
|
|
45
|
+
const userInfoArray = websiteInput
|
|
46
|
+
? [
|
|
47
|
+
{
|
|
48
|
+
label: "What is your name?",
|
|
49
|
+
value: username,
|
|
50
|
+
editData: editInputData("username"),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: "What is your email address?",
|
|
54
|
+
value: email,
|
|
55
|
+
editData: editInputData("email"),
|
|
56
|
+
},
|
|
57
|
+
]
|
|
58
|
+
: [];
|
|
59
|
+
|
|
33
60
|
const nonPeopleDataLabsCompanyInputs = [
|
|
61
|
+
...nameInputArray,
|
|
34
62
|
{
|
|
35
63
|
label: "How many employees work for your company?",
|
|
36
64
|
value: employeeCount,
|
|
@@ -76,8 +104,9 @@ const CompanyOnboardingInput = ({
|
|
|
76
104
|
lightBackground
|
|
77
105
|
/>
|
|
78
106
|
),
|
|
79
|
-
onNextStep: () => onFormComplete(inputData),
|
|
107
|
+
onNextStep: !websiteInput && (() => onFormComplete(inputData)),
|
|
80
108
|
},
|
|
109
|
+
...userInfoArray,
|
|
81
110
|
];
|
|
82
111
|
|
|
83
112
|
const formInputArray = nonPeopleDataLabsCompanyInputs.map((input) => ({
|