@aclymatepackages/modules 2.1.25 → 2.1.26
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/dist/components/FootprintEquivalencies.js +1 -1
- package/dist/components/PdlCompanySelect.js +3 -1
- package/dist/components/PlacesAutocomplete.js +1 -4
- package/dist/components/ReportSummaryBlock.js +1 -2
- package/package.json +3 -5
- package/src/components/FootprintEquivalencies.js +1 -1
- package/src/components/PdlCompanySelect.js +5 -0
- package/src/components/PlacesAutocomplete.js +0 -3
- package/src/components/ReportSummaryBlock.js +1 -1
|
@@ -159,7 +159,7 @@ const FootprintEquivalencies = _ref => {
|
|
|
159
159
|
height: "100%"
|
|
160
160
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
161
161
|
alt: "".concat(type, "-image"),
|
|
162
|
-
src: "https://aclymate.
|
|
162
|
+
src: "https://dashboard.aclymate.com/images/footprint-equivalencies/".concat(type, ".svg"),
|
|
163
163
|
style: {
|
|
164
164
|
width: "100%",
|
|
165
165
|
maxHeight: "250px"
|
|
@@ -48,7 +48,8 @@ const PdlCompanySelect = _ref2 => {
|
|
|
48
48
|
onSelectClick = () => {},
|
|
49
49
|
matchingFunction,
|
|
50
50
|
label = "Enter your company's name",
|
|
51
|
-
actionLabel = "Please select your company from these options"
|
|
51
|
+
actionLabel = "Please select your company from these options",
|
|
52
|
+
helperText
|
|
52
53
|
} = _ref2;
|
|
53
54
|
const [inputValue, setInputValue] = (0, _react.useState)("");
|
|
54
55
|
const [matchingCompanies, setMatchingCompanies] = (0, _react.useState)([]);
|
|
@@ -97,6 +98,7 @@ const PdlCompanySelect = _ref2 => {
|
|
|
97
98
|
return fetchMatchingCompanies();
|
|
98
99
|
}
|
|
99
100
|
},
|
|
101
|
+
helperText: helperText || "Press enter or click the search icon to search for matching companies",
|
|
100
102
|
InputProps: {
|
|
101
103
|
endAdornment: /*#__PURE__*/_react.default.createElement(_material.InputAdornment, null, /*#__PURE__*/_react.default.createElement(_material.IconButton, {
|
|
102
104
|
disabled: pdlFetchLoading,
|
|
@@ -15,7 +15,6 @@ require("core-js/modules/esnext.string.replace-all.js");
|
|
|
15
15
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _parse = _interopRequireDefault(require("autosuggest-highlight/parse"));
|
|
18
|
-
var _appCheck = require("firebase/app-check");
|
|
19
18
|
var _Autocomplete = _interopRequireDefault(require("@mui/lab/Autocomplete"));
|
|
20
19
|
var _material = require("@mui/material");
|
|
21
20
|
var _fetchAclymateApi = _interopRequireDefault(require("@aclymatepackages/fetch-aclymate-api"));
|
|
@@ -44,8 +43,7 @@ const PlacesAutocomplete = _ref => {
|
|
|
44
43
|
id,
|
|
45
44
|
style,
|
|
46
45
|
textFieldProps,
|
|
47
|
-
coordinates
|
|
48
|
-
appCheckToken
|
|
46
|
+
coordinates
|
|
49
47
|
} = _ref;
|
|
50
48
|
const [inputValue, setInputValue] = (0, _react.useState)("");
|
|
51
49
|
const [options, setOptions] = (0, _react.useState)([]);
|
|
@@ -68,7 +66,6 @@ const PlacesAutocomplete = _ref => {
|
|
|
68
66
|
return data.predictions;
|
|
69
67
|
};
|
|
70
68
|
return await (0, _fetchAclymateApi.default)({
|
|
71
|
-
appCheckToken,
|
|
72
69
|
path: "/google-maps/autocomplete/".concat(dataString),
|
|
73
70
|
method: "GET",
|
|
74
71
|
signal,
|
|
@@ -8,7 +8,6 @@ require("core-js/modules/web.dom-collections.iterator.js");
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _material = require("@mui/material");
|
|
10
10
|
var _otherHelpers = require("@aclymatepackages/other-helpers");
|
|
11
|
-
var _emissionsCalcs = require("@aclymatepackages/emissions-calcs");
|
|
12
11
|
var _ReportGraphContentLayout = _interopRequireDefault(require("./ReportGraphContentLayout"));
|
|
13
12
|
var _EmissionsPieChart = _interopRequireDefault(require("./EmissionsPieChart"));
|
|
14
13
|
var _EmissionsSummarySentence = _interopRequireDefault(require("./EmissionsSummarySentence"));
|
|
@@ -30,7 +29,7 @@ const ReportSummaryBlock = _ref => {
|
|
|
30
29
|
const {
|
|
31
30
|
scope
|
|
32
31
|
} = scopeObj;
|
|
33
|
-
const scopeEmissions = (0,
|
|
32
|
+
const scopeEmissions = (0, _otherHelpers.filterEmissionsByScope)(emissions, scope);
|
|
34
33
|
return _objectSpread(_objectSpread({}, scopeObj), {}, {
|
|
35
34
|
emissions: scopeEmissions
|
|
36
35
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aclymatepackages/modules",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.26",
|
|
4
4
|
"description": "Aclymate modules",
|
|
5
5
|
"author": "William Loopesko",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,12 +9,11 @@
|
|
|
9
9
|
"@aclymatepackages/atoms": "^3.0.8",
|
|
10
10
|
"@aclymatepackages/chart-helpers": "^2.0.5",
|
|
11
11
|
"@aclymatepackages/converters": "^1.0.0",
|
|
12
|
-
"@aclymatepackages/
|
|
13
|
-
"@aclymatepackages/fetch-aclymate-api": "^2.1.6",
|
|
12
|
+
"@aclymatepackages/fetch-aclymate-api": "^1.0.0",
|
|
14
13
|
"@aclymatepackages/formatters": "^1.0.0",
|
|
15
14
|
"@aclymatepackages/lists": "^1.0.0",
|
|
16
15
|
"@aclymatepackages/multi-part-form": "^2.0.1",
|
|
17
|
-
"@aclymatepackages/other-helpers": "^1.0.
|
|
16
|
+
"@aclymatepackages/other-helpers": "^1.0.9",
|
|
18
17
|
"@aclymatepackages/reg-exp": "^1.0.0",
|
|
19
18
|
"@aclymatepackages/subcategories": "^3.1.6",
|
|
20
19
|
"@aclymatepackages/themes": "^3.0.7",
|
|
@@ -28,7 +27,6 @@
|
|
|
28
27
|
"@stripe/stripe-js": "^1.53.0",
|
|
29
28
|
"autosuggest-highlight": "^3.2.1",
|
|
30
29
|
"dayjs": "^1.11.7",
|
|
31
|
-
"firebase": "^10.12.2",
|
|
32
30
|
"npm": "^8.19.4",
|
|
33
31
|
"react-countup": "^4.4.0",
|
|
34
32
|
"recharts": "^2.10.4",
|
|
@@ -167,7 +167,7 @@ const FootprintEquivalencies = ({
|
|
|
167
167
|
<Box position="relative" width="100%" height="100%">
|
|
168
168
|
<img
|
|
169
169
|
alt={`${type}-image`}
|
|
170
|
-
src={`https://aclymate.
|
|
170
|
+
src={`https://dashboard.aclymate.com/images/footprint-equivalencies/${type}.svg`}
|
|
171
171
|
style={{ width: "100%", maxHeight: "250px" }}
|
|
172
172
|
/>
|
|
173
173
|
<Paper
|
|
@@ -43,6 +43,7 @@ const PdlCompanySelect = ({
|
|
|
43
43
|
matchingFunction,
|
|
44
44
|
label = "Enter your company's name",
|
|
45
45
|
actionLabel = "Please select your company from these options",
|
|
46
|
+
helperText,
|
|
46
47
|
}) => {
|
|
47
48
|
const [inputValue, setInputValue] = useState("");
|
|
48
49
|
const [matchingCompanies, setMatchingCompanies] = useState([]);
|
|
@@ -89,6 +90,10 @@ const PdlCompanySelect = ({
|
|
|
89
90
|
return fetchMatchingCompanies();
|
|
90
91
|
}
|
|
91
92
|
}}
|
|
93
|
+
helperText={
|
|
94
|
+
helperText ||
|
|
95
|
+
"Press enter or click the search icon to search for matching companies"
|
|
96
|
+
}
|
|
92
97
|
InputProps={{
|
|
93
98
|
endAdornment: (
|
|
94
99
|
<InputAdornment>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect, useCallback } from "react";
|
|
2
2
|
import parse from "autosuggest-highlight/parse";
|
|
3
|
-
import { getToken } from "firebase/app-check";
|
|
4
3
|
|
|
5
4
|
import Autocomplete from "@mui/lab/Autocomplete";
|
|
6
5
|
import { Grid, Typography, TextField } from "@mui/material";
|
|
@@ -24,7 +23,6 @@ const PlacesAutocomplete = ({
|
|
|
24
23
|
style,
|
|
25
24
|
textFieldProps,
|
|
26
25
|
coordinates,
|
|
27
|
-
appCheckToken,
|
|
28
26
|
}) => {
|
|
29
27
|
const [inputValue, setInputValue] = useState("");
|
|
30
28
|
const [options, setOptions] = useState([]);
|
|
@@ -46,7 +44,6 @@ const PlacesAutocomplete = ({
|
|
|
46
44
|
};
|
|
47
45
|
|
|
48
46
|
return await fetchAclymateApi({
|
|
49
|
-
appCheckToken,
|
|
50
47
|
path: `/google-maps/autocomplete/${dataString}`,
|
|
51
48
|
method: "GET",
|
|
52
49
|
signal,
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { Typography } from "@mui/material";
|
|
4
4
|
|
|
5
5
|
import { buildEmissionsSummarySentence } from "@aclymatepackages/other-helpers";
|
|
6
|
-
import { filterEmissionsByScope } from "@aclymatepackages/
|
|
6
|
+
import { filterEmissionsByScope } from "@aclymatepackages/other-helpers";
|
|
7
7
|
|
|
8
8
|
import ReportGraphContentLayout from "./ReportGraphContentLayout";
|
|
9
9
|
import EmissionsPieChart from "./EmissionsPieChart";
|