mario-education 2.4.589-feedback → 2.4.590-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.
- package/dist/containers/Dashboard/components/GenerateTrendQuestion.d.ts +1 -1
- package/dist/containers/Dashboard/components/ReadinessToLearnTab.d.ts +1 -1
- package/dist/containers/Dashboard/configs/types.d.ts +2 -0
- package/dist/index.js +18 -14
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +18 -14
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IGenerateTrendQuestion } from "../configs/types";
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({ series, avgQuestionLastMonth, icons, className, noAvgText }: IGenerateTrendQuestion) => JSX.Element>;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ series, avgQuestionLastMonth, icons, className, noAvgText, timeOfDay }: IGenerateTrendQuestion) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IReadinessToLearnTab } from "../configs/types";
|
|
2
|
-
declare const ReadinessToLearnTab: ({ dataReadinessOfChart, handleHoverTooltip, classFontSize, dataOverallReadyToLearn, dayOfWeekOneToOne, monthsOneToOne, avgQuestionLastMonth, preparednessData, preparednessWeeklyData, weeksOneToOne, setOptionDate, activeColumn, onActiveColumn }: IReadinessToLearnTab) => JSX.Element;
|
|
2
|
+
declare const ReadinessToLearnTab: ({ dataReadinessOfChart, handleHoverTooltip, classFontSize, dataOverallReadyToLearn, dayOfWeekOneToOne, monthsOneToOne, avgQuestionLastMonth, preparednessData, preparednessWeeklyData, weeksOneToOne, setOptionDate, activeColumn, onActiveColumn, timeOfDay }: IReadinessToLearnTab) => JSX.Element;
|
|
3
3
|
export default ReadinessToLearnTab;
|
|
@@ -640,6 +640,7 @@ export interface IReadinessToLearnTab {
|
|
|
640
640
|
setOptionDate?: Function;
|
|
641
641
|
onActiveColumn?: any;
|
|
642
642
|
activeColumn?: boolean[];
|
|
643
|
+
timeOfDay?: string;
|
|
643
644
|
}
|
|
644
645
|
export interface IGenerateTrendQuestion {
|
|
645
646
|
series: ISeries[];
|
|
@@ -648,6 +649,7 @@ export interface IGenerateTrendQuestion {
|
|
|
648
649
|
icons: string[];
|
|
649
650
|
className?: string;
|
|
650
651
|
noAvgText?: boolean;
|
|
652
|
+
timeOfDay?: string;
|
|
651
653
|
}
|
|
652
654
|
export interface FILTER_STUDENT_WELLBEING {
|
|
653
655
|
startDate?: number;
|
package/dist/index.js
CHANGED
|
@@ -36318,32 +36318,31 @@ var GenerateTrendQuestion = function GenerateTrendQuestion(_ref) {
|
|
|
36318
36318
|
avgQuestionLastMonth = _ref.avgQuestionLastMonth,
|
|
36319
36319
|
icons = _ref.icons,
|
|
36320
36320
|
className = _ref.className,
|
|
36321
|
-
noAvgText = _ref.noAvgText
|
|
36321
|
+
noAvgText = _ref.noAvgText,
|
|
36322
|
+
timeOfDay = _ref.timeOfDay;
|
|
36322
36323
|
|
|
36323
36324
|
var _useTranslation = marioCore.useTranslation(),
|
|
36324
36325
|
t = _useTranslation.t;
|
|
36325
36326
|
|
|
36326
36327
|
var avgs = React.useMemo(function () {
|
|
36327
36328
|
return series.map(function (element) {
|
|
36328
|
-
var avgLast = avgQuestionLastMonth.find(function (r) {
|
|
36329
|
-
return r.questionText.toLowerCase().includes(element.name.toLowerCase());
|
|
36330
|
-
});
|
|
36331
|
-
|
|
36332
|
-
if (avgLast) {
|
|
36333
|
-
return avgLast.avgQuestionResponse - avgLast.avgQuestionResponseLastMonth;
|
|
36334
|
-
}
|
|
36335
|
-
|
|
36336
36329
|
var sum = element.data.reduce(function (acc, val) {
|
|
36337
36330
|
return acc + val;
|
|
36338
36331
|
}, 0);
|
|
36339
36332
|
return sum / element.data.length;
|
|
36340
36333
|
});
|
|
36341
|
-
}, [series
|
|
36334
|
+
}, [series]);
|
|
36342
36335
|
return React__default.createElement(core$1.Grid, {
|
|
36343
36336
|
className: "" + styles$3["trend-question-list"]
|
|
36344
36337
|
}, series.map(function (item, index) {
|
|
36345
36338
|
var _item$data;
|
|
36346
36339
|
|
|
36340
|
+
var avgLast = avgQuestionLastMonth.find(function (r) {
|
|
36341
|
+
var _r$questionText, _r$questionText$toLow, _item$name;
|
|
36342
|
+
|
|
36343
|
+
return (_r$questionText = r.questionText) === null || _r$questionText === void 0 ? void 0 : (_r$questionText$toLow = _r$questionText.toLowerCase()) === null || _r$questionText$toLow === void 0 ? void 0 : _r$questionText$toLow.includes((_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.toLowerCase());
|
|
36344
|
+
});
|
|
36345
|
+
var trendPercent = !avgLast ? 0 : avgLast.avgQuestionResponse - avgLast.avgQuestionResponseLastMonth;
|
|
36347
36346
|
return React__default.createElement(core$1.Grid, {
|
|
36348
36347
|
key: item.name,
|
|
36349
36348
|
className: "" + styles$3["trend-question-item"]
|
|
@@ -36357,8 +36356,9 @@ var GenerateTrendQuestion = function GenerateTrendQuestion(_ref) {
|
|
|
36357
36356
|
alt: ""
|
|
36358
36357
|
})), React__default.createElement(GraphTrend, {
|
|
36359
36358
|
label: getDescriptionFromPercent((item === null || item === void 0 ? void 0 : (_item$data = item.data) === null || _item$data === void 0 ? void 0 : _item$data[0]) || 0, item.description) || "",
|
|
36360
|
-
value:
|
|
36361
|
-
valueData: avgs[index] || 0
|
|
36359
|
+
value: trendPercent || 0,
|
|
36360
|
+
valueData: avgs[index] || 0,
|
|
36361
|
+
timeOfDay: timeOfDay
|
|
36362
36362
|
}));
|
|
36363
36363
|
}));
|
|
36364
36364
|
};
|
|
@@ -36454,7 +36454,8 @@ var ReadinessToLearnTab = function ReadinessToLearnTab(_ref) {
|
|
|
36454
36454
|
weeksOneToOne = _ref.weeksOneToOne,
|
|
36455
36455
|
setOptionDate = _ref.setOptionDate,
|
|
36456
36456
|
activeColumn = _ref.activeColumn,
|
|
36457
|
-
onActiveColumn = _ref.onActiveColumn
|
|
36457
|
+
onActiveColumn = _ref.onActiveColumn,
|
|
36458
|
+
timeOfDay = _ref.timeOfDay;
|
|
36458
36459
|
var preferredOrder = ['Energy', 'Happiness', 'Focus'];
|
|
36459
36460
|
var sortedData = [].concat(dataReadinessOfChart).sort(function (a, b) {
|
|
36460
36461
|
return preferredOrder.indexOf(removeHTMLTags(a.questionText)) - preferredOrder.indexOf(removeHTMLTags(b.questionText));
|
|
@@ -36472,6 +36473,7 @@ var ReadinessToLearnTab = function ReadinessToLearnTab(_ref) {
|
|
|
36472
36473
|
}, React__default.createElement(GenerateTrendQuestion$1, {
|
|
36473
36474
|
avgQuestionLastMonth: avgQuestionLastMonth,
|
|
36474
36475
|
series: preparednessData,
|
|
36476
|
+
timeOfDay: timeOfDay,
|
|
36475
36477
|
icons: ["home/energy.png", "home/focus.png", "home/happiness.png"],
|
|
36476
36478
|
trendLabels: ["Feeling Okay", "Generally focused", "More positives than negatives"],
|
|
36477
36479
|
className: "trend-item-icon-large"
|
|
@@ -36550,6 +36552,7 @@ var SuccessIndicatorTab = function SuccessIndicatorTab(_ref) {
|
|
|
36550
36552
|
}, React__default.createElement(GenerateTrendQuestion$1, {
|
|
36551
36553
|
avgQuestionLastMonth: avgQuestionLastMonth,
|
|
36552
36554
|
series: successIndicatorsData,
|
|
36555
|
+
timeOfDay: timeOfDay,
|
|
36553
36556
|
icons: ["well-being-icon.png", "growth-icon.png", "relationship-icon.png", "personal-icon-quests.svg", "academic-icon.png", "self-efficacy-icon.png"],
|
|
36554
36557
|
trendLabels: ["Generally okay", "Good growth overall", "All key relationships are positive", "Meeting some deadlines", "On target in most areas", "Lacking some self-belief"],
|
|
36555
36558
|
noAvgText: true
|
|
@@ -38175,7 +38178,8 @@ var Dashboard = function Dashboard() {
|
|
|
38175
38178
|
weeksOneToOne: weeksOneToOne,
|
|
38176
38179
|
setOptionDate: setOptionDate,
|
|
38177
38180
|
onActiveColumn: handleActiveColumn,
|
|
38178
|
-
activeColumn: activeColumnReadiness
|
|
38181
|
+
activeColumn: activeColumnReadiness,
|
|
38182
|
+
timeOfDay: filter.optionDate
|
|
38179
38183
|
})
|
|
38180
38184
|
}, {
|
|
38181
38185
|
label: "open_field_questions",
|