@aclymatepackages/modules 3.0.0 → 3.0.2

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.
@@ -62,9 +62,10 @@ const EmissionsPieChart = _ref2 => {
62
62
  pieChartRef,
63
63
  branding,
64
64
  showTooltip = true,
65
- CustomTooltip
65
+ CustomTooltip,
66
+ subcategoriesArray: subcategoriesArrayProp
66
67
  } = _ref2;
67
- const subcategoriesArray = (0, _subcategories.buildSubcategoriesArray)(emissions);
68
+ const subcategoriesArray = subcategoriesArrayProp || (0, _subcategories.buildSubcategoriesArray)(emissions);
68
69
  const scopesArray = (0, _subcategories.buildScopesWithColors)(branding);
69
70
  const emissionsSum = (0, _otherHelpers.sumTonsCo2e)(emissions);
70
71
  const formatChartPieSlices = () => {
@@ -198,7 +198,7 @@ const FootprintVideo = _ref6 => {
198
198
  // eslint-disable-next-line
199
199
  }, [videoStep, showVideos]);
200
200
  const onAdvanceSlide = () => setVideoStep(currentStep => currentStep + 1);
201
- const intermediateStepLabels = ["That's as much carbon as driving ".concat((0, _converters.convertFootprintToDriving)(monthlyFootprintTons), " miles."), "Or cutting down more than ".concat((0, _converters.convertFootprintToTrees)(monthlyFootprintTons), " 50-year-old tree").concat((0, _formatters.letterSBoolean)((0, _converters.convertFootprintToTrees)(monthlyFootprintTons)), "."), "It's enough to melt more than ".concat(formatDecimal((0, _converters.convertFootprintToIce)(monthlyFootprintTons)), " square feet of Arctic sea ice that will never come back."), "And your company emits this much carbon every single month."];
201
+ const intermediateStepLabels = ["That's as much carbon as driving ".concat((0, _converters.convertFootprintToDriving)(monthlyFootprintTons), " miles."), "Or cutting down more than ".concat((0, _converters.convertFootprintToTrees)(monthlyFootprintTons), " 50-year-old tree").concat((0, _formatters.letterSBoolean)((0, _converters.convertFootprintToTrees)(monthlyFootprintTons)), "."), "It's enough to melt more than ".concat((0, _formatters.formatDecimal)((0, _converters.convertFootprintToIce)(monthlyFootprintTons)), " square feet of Arctic sea ice that will never come back."), "And your company emits this much carbon every single month."];
202
202
  const onboardingFootprintSteps = [/*#__PURE__*/_react.default.createElement(VideoFootprintDisplay, {
203
203
  monthlyFootprintTons: monthlyFootprintTons,
204
204
  onAdvanceSlide: onAdvanceSlide
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aclymatepackages/modules",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "Aclymate modules",
5
5
  "author": "William Loopesko",
6
6
  "main": "dist/index.js",
@@ -55,8 +55,10 @@ const EmissionsPieChart = ({
55
55
  branding,
56
56
  showTooltip = true,
57
57
  CustomTooltip,
58
+ subcategoriesArray: subcategoriesArrayProp,
58
59
  }) => {
59
- const subcategoriesArray = buildSubcategoriesArray(emissions);
60
+ const subcategoriesArray =
61
+ subcategoriesArrayProp || buildSubcategoriesArray(emissions);
60
62
  const scopesArray = buildScopesWithColors(branding);
61
63
 
62
64
  const emissionsSum = sumTonsCo2e(emissions);
@@ -15,7 +15,7 @@ import {
15
15
  convertFootprintToIce,
16
16
  convertFootprintToTrees,
17
17
  } from "@aclymatepackages/converters";
18
- import { letterSBoolean } from "@aclymatepackages/formatters";
18
+ import { letterSBoolean, formatDecimal } from "@aclymatepackages/formatters";
19
19
 
20
20
  const OnboardingFootprintLayout = ({ children }) => {
21
21
  const [backgroundFade, setBackgroundFade] = useState(false);