@aclymatepackages/modules 5.0.1 → 5.0.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.
@@ -13,6 +13,7 @@ var _Cancel = _interopRequireDefault(require("@mui/icons-material/Cancel"));
13
13
  var _arrayImmutabilityHelpers = require("@aclymatepackages/array-immutability-helpers");
14
14
  var _atoms = require("@aclymatepackages/atoms");
15
15
  var _modules = require("@aclymatepackages/modules");
16
+ var _IndustryAutocomplete = _interopRequireDefault(require("./IndustryAutocomplete"));
16
17
  var _regExp = require("@aclymatepackages/reg-exp");
17
18
  var _googleMaps = _interopRequireDefault(require("@aclymatepackages/google-maps"));
18
19
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -21,7 +22,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
21
22
  const CompanyDataConfirmation = _ref => {
22
23
  let {
23
24
  companyData,
24
- onConfirmClick
25
+ onConfirmClick,
26
+ fetchNaicsCodes
25
27
  } = _ref;
26
28
  const {
27
29
  address: existingAddress
@@ -56,10 +58,10 @@ const CompanyDataConfirmation = _ref => {
56
58
  value: employeeCount,
57
59
  setValue: editCompanyData("employeeCount"),
58
60
  error: employeeCount && !(0, _regExp.numbersRegExpTest)(employeeCount)
59
- }), /*#__PURE__*/_react.default.createElement(_modules.IndustryAutocomplete, {
61
+ }), /*#__PURE__*/_react.default.createElement(_IndustryAutocomplete.default, {
60
62
  industry: industry,
61
63
  setIndustry: editCompanyData("industry"),
62
- helperText: "We'll use this to estimate your emissions and benchmark to other similar companies"
64
+ fetchNaicsCodes: fetchNaicsCodes
63
65
  }), /*#__PURE__*/_react.default.createElement(_modules.YesNoQuestion, {
64
66
  question: "Does your company only work remotely?",
65
67
  value: isRemote,
@@ -28,6 +28,7 @@ const CompanyOnboardingInput = _ref => {
28
28
  let {
29
29
  appCheckToken,
30
30
  companyName = "",
31
+ fetchNaicsCodes,
31
32
  header,
32
33
  onFormComplete,
33
34
  PlacesAutocomplete,
@@ -67,10 +68,9 @@ const CompanyOnboardingInput = _ref => {
67
68
  }, {
68
69
  value: industry,
69
70
  input: /*#__PURE__*/_react.default.createElement(_IndustryAutocomplete.default, {
70
- label: "Choose your company's industry",
71
71
  industry: industry,
72
72
  setIndustry: editInputData("industry"),
73
- helperText: "We'll use this to estimate your emissions and benchmark to other similar companies"
73
+ fetchNaicsCodes: fetchNaicsCodes
74
74
  })
75
75
  }, {
76
76
  value: location,
@@ -61,11 +61,20 @@ const IndustryAutocomplete = _ref => {
61
61
  searchFunction: onSearch
62
62
  })), showCurrentChip && /*#__PURE__*/_react.default.createElement(_material.Grid, {
63
63
  item: true,
64
- alignSelf: "center"
64
+ container: true,
65
+ direction: "column",
66
+ spacing: 1
67
+ }, /*#__PURE__*/_react.default.createElement(_material.Grid, {
68
+ item: true
69
+ }, /*#__PURE__*/_react.default.createElement(_material.Typography, {
70
+ variant: "caption",
71
+ color: "textSecondary"
72
+ }, "Company Industry")), /*#__PURE__*/_react.default.createElement(_material.Grid, {
73
+ item: true
65
74
  }, /*#__PURE__*/_react.default.createElement(_material.Chip, {
66
75
  label: (0, _otherHelpers.truncateText)(industryTitle, 50),
67
76
  onDelete: onDeleteCurrentIndustry
68
- })), showOptions && /*#__PURE__*/_react.default.createElement(_material.Grid, {
77
+ }))), showOptions && /*#__PURE__*/_react.default.createElement(_material.Grid, {
69
78
  item: true,
70
79
  container: true,
71
80
  spacing: 2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aclymatepackages/modules",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "Aclymate modules",
5
5
  "author": "William Loopesko",
6
6
  "main": "dist/index.js",
@@ -16,15 +16,13 @@ import CancelIcon from "@mui/icons-material/Cancel";
16
16
 
17
17
  import { editObjectData } from "@aclymatepackages/array-immutability-helpers";
18
18
  import { TextField } from "@aclymatepackages/atoms";
19
- import {
20
- IndustryAutocomplete,
21
- YesNoQuestion,
22
- PlacesAutocomplete,
23
- } from "@aclymatepackages/modules";
19
+ import { YesNoQuestion, PlacesAutocomplete } from "@aclymatepackages/modules";
20
+
21
+ import IndustryAutocomplete from "./IndustryAutocomplete";
24
22
  import { numbersRegExpTest } from "@aclymatepackages/reg-exp";
25
23
  import GoogleMap from "@aclymatepackages/google-maps";
26
24
 
27
- const CompanyDataConfirmation = ({ companyData, onConfirmClick }) => {
25
+ const CompanyDataConfirmation = ({ companyData, onConfirmClick, fetchNaicsCodes }) => {
28
26
  const { address: existingAddress } = companyData || {};
29
27
  const { coordinates: existingCoordinates } = existingAddress || {};
30
28
 
@@ -64,7 +62,7 @@ const CompanyDataConfirmation = ({ companyData, onConfirmClick }) => {
64
62
  <IndustryAutocomplete
65
63
  industry={industry}
66
64
  setIndustry={editCompanyData("industry")}
67
- helperText="We'll use this to estimate your emissions and benchmark to other similar companies"
65
+ fetchNaicsCodes={fetchNaicsCodes}
68
66
  />,
69
67
  <YesNoQuestion
70
68
  question="Does your company only work remotely?"
@@ -15,6 +15,7 @@ import PlacesAutocompleteModule from "./PlacesAutocomplete";
15
15
  const CompanyOnboardingInput = ({
16
16
  appCheckToken,
17
17
  companyName = "",
18
+ fetchNaicsCodes,
18
19
  header,
19
20
  onFormComplete,
20
21
  PlacesAutocomplete,
@@ -65,10 +66,9 @@ const CompanyOnboardingInput = ({
65
66
  value: industry,
66
67
  input: (
67
68
  <IndustryAutocomplete
68
- label="Choose your company's industry"
69
69
  industry={industry}
70
70
  setIndustry={editInputData("industry")}
71
- helperText="We'll use this to estimate your emissions and benchmark to other similar companies"
71
+ fetchNaicsCodes={fetchNaicsCodes}
72
72
  />
73
73
  ),
74
74
  },
@@ -59,11 +59,18 @@ const IndustryAutocomplete = ({
59
59
  </Grid>
60
60
  )}
61
61
  {showCurrentChip && (
62
- <Grid item alignSelf="center">
63
- <Chip
64
- label={truncateText(industryTitle, 50)}
65
- onDelete={onDeleteCurrentIndustry}
66
- />
62
+ <Grid item container direction="column" spacing={1}>
63
+ <Grid item>
64
+ <Typography variant="caption" color="textSecondary">
65
+ Company Industry
66
+ </Typography>
67
+ </Grid>
68
+ <Grid item>
69
+ <Chip
70
+ label={truncateText(industryTitle, 50)}
71
+ onDelete={onDeleteCurrentIndustry}
72
+ />
73
+ </Grid>
67
74
  </Grid>
68
75
  )}
69
76
  {showOptions && (