mario-education 2.4.584-feedback → 2.4.585-feedback

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.
@@ -8,7 +8,7 @@ declare const useFrequencyAndSetup: () => {
8
8
  openModalDelete: boolean;
9
9
  setOpenModalDelete: import("react").Dispatch<import("react").SetStateAction<boolean>>;
10
10
  setup: IWellBeingSetup;
11
- onChangeSetup: <K extends "id" | "contacts" | "sections" | "frequencyMode" | "frequencyType" | "customFrequencyDays" | "isContactFlowEnabled">(key: K, value: IWellBeingSetup[K]) => void;
11
+ onChangeSetup: <K extends "id" | "frequencyMode" | "frequencyType" | "customFrequencyDays" | "isContactFlowEnabled" | "sections" | "contacts">(key: K, value: IWellBeingSetup[K]) => void;
12
12
  contacts: IWellBeingFlowContact[];
13
13
  sections: IWellBeingSection[];
14
14
  onChangeSections: (orderSections: IWellBeingSection[]) => void;
package/dist/index.js CHANGED
@@ -34320,7 +34320,7 @@ var getColorAnswer = function getColorAnswer(value, isStress) {
34320
34320
  };
34321
34321
 
34322
34322
  var GraphTrend = function GraphTrend(_ref) {
34323
- var _Math$abs;
34323
+ var _ref2;
34324
34324
 
34325
34325
  var value = _ref.value,
34326
34326
  label = _ref.label,
@@ -34335,7 +34335,7 @@ var GraphTrend = function GraphTrend(_ref) {
34335
34335
  backgroundColor: bgColor
34336
34336
  },
34337
34337
  className: "" + styles$3["graph-label"]
34338
- }, label + " | " + ((_Math$abs = Math.abs(valueData || 0)) === null || _Math$abs === void 0 ? void 0 : _Math$abs.toFixed(2)) + "%"), timeOfDay && React__default.createElement("img", {
34338
+ }, label + " | " + ((_ref2 = valueData || 0) === null || _ref2 === void 0 ? void 0 : _ref2.toFixed(2)) + "%"), timeOfDay && React__default.createElement("img", {
34339
34339
  src: "/images/" + (value < 0 ? "trend-down.png" : "trend-up.png"),
34340
34340
  alt: "Graph Trend Icon"
34341
34341
  }));
@@ -36000,7 +36000,7 @@ var GeneratePlpChart = function GeneratePlpChart(_ref) {
36000
36000
  var lgListItem = (name === t(readinessTrendName) || name === t(successIndicatorsName) || name === t(overallReadinessToLearnName) || name === t(learningProcessName)) && "auto";
36001
36001
 
36002
36002
  var avgValue = function avgValue(arr) {
36003
- return arr.reduce(function (a, b) {
36003
+ return arr.length === 0 ? 0 : arr.reduce(function (a, b) {
36004
36004
  return a + b;
36005
36005
  }) / arr.length;
36006
36006
  };
@@ -73611,9 +73611,7 @@ var useStudentWellness = function useStudentWellness(studentId, filterDateChart,
73611
73611
  var stressDataConvert = stressDataQuestion.map(function (r) {
73612
73612
  return {
73613
73613
  name: r.name,
73614
- data: r.data.map(function (i) {
73615
- return i / 2 + 50;
73616
- })
73614
+ data: r.data
73617
73615
  };
73618
73616
  });
73619
73617
  setDataConvertedOneToOne(questions);
@@ -74724,7 +74722,7 @@ var StudentWellness = function StudentWellness(_ref) {
74724
74722
  return calculatePercent(safetyData === null || safetyData === void 0 ? void 0 : safetyData[0]);
74725
74723
  }, [safetyData]);
74726
74724
  var stressPercent = React.useMemo(function () {
74727
- return calculatePercent(stressData === null || stressData === void 0 ? void 0 : stressData[0], true);
74725
+ return calculatePercent(stressData === null || stressData === void 0 ? void 0 : stressData[0]);
74728
74726
  }, [stressData]);
74729
74727
  var safetyDiffPercent = React.useMemo(function () {
74730
74728
  return calculateDiffPercent(safetyData === null || safetyData === void 0 ? void 0 : safetyData[0]);