mario-education 2.4.589-feedback → 2.4.591-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.
@@ -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
@@ -1373,6 +1373,10 @@ var useConferenceRubricList = function useConferenceRubricList() {
1373
1373
  };
1374
1374
  };
1375
1375
 
1376
+ var domainName = window.location.hostname;
1377
+ var listCheckMalvernCollege = ['malverncollege', 'stage', 'localhost'];
1378
+ var isMalvernCollege = listCheckMalvernCollege.includes(domainName);
1379
+ var isSaisSchool = window.location.hostname.includes('sais');
1376
1380
  var CONFERENCE_RUBRIC_TYPES = {
1377
1381
  Default: "None",
1378
1382
  Balanced: "Balanced",
@@ -1400,8 +1404,7 @@ var FILTER_NAME;
1400
1404
  var defaultDate = '0001-01-01T00:00:00';
1401
1405
  var SMALL_FONT_DEFAULT = 12;
1402
1406
  var LARGE_FONT_DEFAULT = 20;
1403
- var studentGrades = ["All Grades", "K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"];
1404
- var isSaisSchool = window.location.hostname.includes('sais');
1407
+ var studentGrades = ["All Grades", "K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"].concat(isSaisSchool ? ["PCS"] : [], ["13"], isMalvernCollege ? ["12/13"] : []);
1405
1408
  var screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
1406
1409
  var stringOrderIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M9.00002 19.6153C8.55585 19.6153 8.1756 19.4571 7.85927 19.1408C7.54293 18.8244 7.38477 18.4442 7.38477 18C7.38477 17.5558 7.54293 17.1756 7.85927 16.8593C8.1756 16.5429 8.55585 16.3848 9.00002 16.3848C9.44418 16.3848 9.82443 16.5429 10.1408 16.8593C10.4571 17.1756 10.6153 17.5558 10.6153 18C10.6153 18.4442 10.4571 18.8244 10.1408 19.1408C9.82443 19.4571 9.44418 19.6153 9.00002 19.6153ZM15 19.6153C14.5558 19.6153 14.1756 19.4571 13.8593 19.1408C13.5429 18.8244 13.3848 18.4442 13.3848 18C13.3848 17.5558 13.5429 17.1756 13.8593 16.8593C14.1756 16.5429 14.5558 16.3848 15 16.3848C15.4442 16.3848 15.8244 16.5429 16.1408 16.8593C16.4571 17.1756 16.6153 17.5558 16.6153 18C16.6153 18.4442 16.4571 18.8244 16.1408 19.1408C15.8244 19.4571 15.4442 19.6153 15 19.6153ZM9.00002 13.6153C8.55585 13.6153 8.1756 13.4571 7.85927 13.1408C7.54293 12.8244 7.38477 12.4442 7.38477 12C7.38477 11.5558 7.54293 11.1756 7.85927 10.8593C8.1756 10.5429 8.55585 10.3848 9.00002 10.3848C9.44418 10.3848 9.82443 10.5429 10.1408 10.8593C10.4571 11.1756 10.6153 11.5558 10.6153 12C10.6153 12.4442 10.4571 12.8244 10.1408 13.1408C9.82443 13.4571 9.44418 13.6153 9.00002 13.6153ZM15 13.6153C14.5558 13.6153 14.1756 13.4571 13.8593 13.1408C13.5429 12.8244 13.3848 12.4442 13.3848 12C13.3848 11.5558 13.5429 11.1756 13.8593 10.8593C14.1756 10.5429 14.5558 10.3848 15 10.3848C15.4442 10.3848 15.8244 10.5429 16.1408 10.8593C16.4571 11.1756 16.6153 11.5558 16.6153 12C16.6153 12.4442 16.4571 12.8244 16.1408 13.1408C15.8244 13.4571 15.4442 13.6153 15 13.6153ZM9.00002 7.61526C8.55585 7.61526 8.1756 7.4571 7.85927 7.14077C7.54293 6.82443 7.38477 6.44418 7.38477 6.00002C7.38477 5.55585 7.54293 5.1756 7.85927 4.85927C8.1756 4.54293 8.55585 4.38477 9.00002 4.38477C9.44418 4.38477 9.82443 4.54293 10.1408 4.85927C10.4571 5.1756 10.6153 5.55585 10.6153 6.00002C10.6153 6.44418 10.4571 6.82443 10.1408 7.14077C9.82443 7.4571 9.44418 7.61526 9.00002 7.61526ZM15 7.61526C14.5558 7.61526 14.1756 7.4571 13.8593 7.14077C13.5429 6.82443 13.3848 6.44418 13.3848 6.00002C13.3848 5.55585 13.5429 5.1756 13.8593 4.85927C14.1756 4.54293 14.5558 4.38477 15 4.38477C15.4442 4.38477 15.8244 4.54293 16.1408 4.85927C16.4571 5.1756 16.6153 5.55585 16.6153 6.00002C16.6153 6.44418 16.4571 6.82443 16.1408 7.14077C15.8244 7.4571 15.4442 7.61526 15 7.61526Z\" fill=\"#D3D3D3\" />\n </svg>";
1407
1410
 
@@ -29155,7 +29158,7 @@ var INITIAL_ACTIVITY_FRIENDS = {
29155
29158
  var LEARNING_STRATEGY_INIT = {
29156
29159
  learningStrategies: []
29157
29160
  };
29158
- var GRAGE_DEFAULT = ["K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"].concat(isSaisSchool ? ["PCS"] : []);
29161
+ var GRAGE_DEFAULT = ["K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"].concat(isMalvernCollege ? ["12/13"] : [], ["13"], isSaisSchool ? ["PCS"] : []);
29159
29162
  var INITIAL_AGE_OF_STUDENT = {
29160
29163
  ageOfFeMaleStudent: {
29161
29164
  nineToTwelve: 0,
@@ -32789,8 +32792,8 @@ var FLAG_TYPES;
32789
32792
  FLAG_TYPES[FLAG_TYPES["GREEN"] = 2] = "GREEN";
32790
32793
  })(FLAG_TYPES || (FLAG_TYPES = {}));
32791
32794
 
32792
- var GRAGE_DEFAULT$1 = ["K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"].concat(isSaisSchool ? ["PCS"] : []);
32793
- var GRADE_DEFAULT_SURVEY = ['All', "K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"].concat(isSaisSchool ? ["PCS"] : []);
32795
+ var GRAGE_DEFAULT$1 = ["K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"].concat(isMalvernCollege ? ["12/13"] : [], ["13"], isSaisSchool ? ["PCS"] : []);
32796
+ var GRADE_DEFAULT_SURVEY = ['All', "K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"].concat(isMalvernCollege ? ["12/13"] : [], ["13"], isSaisSchool ? ["PCS"] : []);
32794
32797
  var GRADE_SURVEY = [{
32795
32798
  label: "All",
32796
32799
  value: ''
@@ -36318,32 +36321,31 @@ var GenerateTrendQuestion = function GenerateTrendQuestion(_ref) {
36318
36321
  avgQuestionLastMonth = _ref.avgQuestionLastMonth,
36319
36322
  icons = _ref.icons,
36320
36323
  className = _ref.className,
36321
- noAvgText = _ref.noAvgText;
36324
+ noAvgText = _ref.noAvgText,
36325
+ timeOfDay = _ref.timeOfDay;
36322
36326
 
36323
36327
  var _useTranslation = marioCore.useTranslation(),
36324
36328
  t = _useTranslation.t;
36325
36329
 
36326
36330
  var avgs = React.useMemo(function () {
36327
36331
  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
36332
  var sum = element.data.reduce(function (acc, val) {
36337
36333
  return acc + val;
36338
36334
  }, 0);
36339
36335
  return sum / element.data.length;
36340
36336
  });
36341
- }, [series, avgQuestionLastMonth]);
36337
+ }, [series]);
36342
36338
  return React__default.createElement(core$1.Grid, {
36343
36339
  className: "" + styles$3["trend-question-list"]
36344
36340
  }, series.map(function (item, index) {
36345
36341
  var _item$data;
36346
36342
 
36343
+ var avgLast = avgQuestionLastMonth.find(function (r) {
36344
+ var _r$questionText, _r$questionText$toLow, _item$name;
36345
+
36346
+ 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());
36347
+ });
36348
+ var trendPercent = !avgLast ? 0 : avgLast.avgQuestionResponse - avgLast.avgQuestionResponseLastMonth;
36347
36349
  return React__default.createElement(core$1.Grid, {
36348
36350
  key: item.name,
36349
36351
  className: "" + styles$3["trend-question-item"]
@@ -36357,8 +36359,9 @@ var GenerateTrendQuestion = function GenerateTrendQuestion(_ref) {
36357
36359
  alt: ""
36358
36360
  })), React__default.createElement(GraphTrend, {
36359
36361
  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: avgs[index] || 0,
36361
- valueData: avgs[index] || 0
36362
+ value: trendPercent || 0,
36363
+ valueData: avgs[index] || 0,
36364
+ timeOfDay: timeOfDay
36362
36365
  }));
36363
36366
  }));
36364
36367
  };
@@ -36454,7 +36457,8 @@ var ReadinessToLearnTab = function ReadinessToLearnTab(_ref) {
36454
36457
  weeksOneToOne = _ref.weeksOneToOne,
36455
36458
  setOptionDate = _ref.setOptionDate,
36456
36459
  activeColumn = _ref.activeColumn,
36457
- onActiveColumn = _ref.onActiveColumn;
36460
+ onActiveColumn = _ref.onActiveColumn,
36461
+ timeOfDay = _ref.timeOfDay;
36458
36462
  var preferredOrder = ['Energy', 'Happiness', 'Focus'];
36459
36463
  var sortedData = [].concat(dataReadinessOfChart).sort(function (a, b) {
36460
36464
  return preferredOrder.indexOf(removeHTMLTags(a.questionText)) - preferredOrder.indexOf(removeHTMLTags(b.questionText));
@@ -36472,6 +36476,7 @@ var ReadinessToLearnTab = function ReadinessToLearnTab(_ref) {
36472
36476
  }, React__default.createElement(GenerateTrendQuestion$1, {
36473
36477
  avgQuestionLastMonth: avgQuestionLastMonth,
36474
36478
  series: preparednessData,
36479
+ timeOfDay: timeOfDay,
36475
36480
  icons: ["home/energy.png", "home/focus.png", "home/happiness.png"],
36476
36481
  trendLabels: ["Feeling Okay", "Generally focused", "More positives than negatives"],
36477
36482
  className: "trend-item-icon-large"
@@ -36550,6 +36555,7 @@ var SuccessIndicatorTab = function SuccessIndicatorTab(_ref) {
36550
36555
  }, React__default.createElement(GenerateTrendQuestion$1, {
36551
36556
  avgQuestionLastMonth: avgQuestionLastMonth,
36552
36557
  series: successIndicatorsData,
36558
+ timeOfDay: timeOfDay,
36553
36559
  icons: ["well-being-icon.png", "growth-icon.png", "relationship-icon.png", "personal-icon-quests.svg", "academic-icon.png", "self-efficacy-icon.png"],
36554
36560
  trendLabels: ["Generally okay", "Good growth overall", "All key relationships are positive", "Meeting some deadlines", "On target in most areas", "Lacking some self-belief"],
36555
36561
  noAvgText: true
@@ -38175,7 +38181,8 @@ var Dashboard = function Dashboard() {
38175
38181
  weeksOneToOne: weeksOneToOne,
38176
38182
  setOptionDate: setOptionDate,
38177
38183
  onActiveColumn: handleActiveColumn,
38178
- activeColumn: activeColumnReadiness
38184
+ activeColumn: activeColumnReadiness,
38185
+ timeOfDay: filter.optionDate
38179
38186
  })
38180
38187
  }, {
38181
38188
  label: "open_field_questions",
@@ -82086,7 +82093,7 @@ var statusCheck = [{
82086
82093
  value: false,
82087
82094
  label: 'Inactive'
82088
82095
  }];
82089
- var gradeLevels = ["K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"];
82096
+ var gradeLevels = ["K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"].concat(isMalvernCollege ? ["12/13"] : [], ["13"], isSaisSchool ? ["PCS"] : []);
82090
82097
  var SPECIAL_ROLE = ['Student'];
82091
82098
 
82092
82099
  var schema$n = yup.object({