mario-education 2.4.33-admin → 2.4.35-admin

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.
@@ -19895,7 +19895,7 @@ var useBehavior = function useBehavior(initialTypeChart) {
19895
19895
  setChartIsOpened(newStateChart);
19896
19896
  };
19897
19897
 
19898
- var onChangeChart = function onChangeChart(idx, type) {
19898
+ var onChangeChart = function onChangeChart(idx, type, options) {
19899
19899
  switch (type) {
19900
19900
  case TYPECHART.AREA:
19901
19901
  if (typeChartList[idx] === TYPECHART.BAR || typeChartList[idx] === TYPECHART.LINE) {
@@ -19907,7 +19907,7 @@ var useBehavior = function useBehavior(initialTypeChart) {
19907
19907
 
19908
19908
  if (typeChartList[idx] === TYPECHART.BOTH) {
19909
19909
  setTypeChartList(typeChartList.map(function (cur, index) {
19910
- return index === idx ? initialTypeChart[idx] : cur;
19910
+ return index === idx ? options[1].value : cur;
19911
19911
  }));
19912
19912
  }
19913
19913
 
@@ -25727,7 +25727,7 @@ var gradeOptions = function gradeOptions(grades, studentUserId) {
25727
25727
  };
25728
25728
  });
25729
25729
  };
25730
- var learningStrategyChartOptions = function learningStrategyChartOptions(labelNames, usageCountList) {
25730
+ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNames, usageCountList, screenWidth) {
25731
25731
  return {
25732
25732
  chart: {
25733
25733
  type: "bar",
@@ -25784,7 +25784,7 @@ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNa
25784
25784
  show: true,
25785
25785
  align: "left",
25786
25786
  minWidth: 0,
25787
- maxWidth: 120,
25787
+ maxWidth: screenWidth,
25788
25788
  style: {
25789
25789
  colors: [],
25790
25790
  fontSize: "14px",
@@ -26626,9 +26626,6 @@ var BarAndAreaChart = function BarAndAreaChart(_ref) {
26626
26626
  _ref$isHasLineChart = _ref.isHasLineChart,
26627
26627
  isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart;
26628
26628
  var newseries = mergeBarChartAndArea(series, isHasLineChart);
26629
- console.log({
26630
- newseries: newseries
26631
- });
26632
26629
  return React.createElement(Chart, {
26633
26630
  options: optionBarChartAndArea(months, activeColumn, newseries),
26634
26631
  series: newseries,
@@ -26937,6 +26934,7 @@ var TopLearningStrategy = function TopLearningStrategy(_ref) {
26937
26934
  return i.usageCount / maxData * 100;
26938
26935
  })
26939
26936
  }];
26937
+ var screenWidth = (window.innerWidth - 256) / 100 * 30;
26940
26938
  return React.createElement("div", {
26941
26939
  className: "h-100 w-100 " + styles$1["chart-background"]
26942
26940
  }, React.createElement("div", {
@@ -26944,7 +26942,7 @@ var TopLearningStrategy = function TopLearningStrategy(_ref) {
26944
26942
  }, serieslearningStrategy.some(function (i) {
26945
26943
  return i.data;
26946
26944
  }) ? React.createElement(Chart, {
26947
- options: learningStrategyChartOptions(labelNames, usageCount),
26945
+ options: learningStrategyChartOptions(labelNames, usageCount, screenWidth),
26948
26946
  series: serieslearningStrategy,
26949
26947
  type: "bar",
26950
26948
  width: "100%",
@@ -27163,13 +27161,15 @@ var useDashboard = function useDashboard() {
27163
27161
  };
27164
27162
 
27165
27163
  useEffect(function () {
27166
- setSeriesOneToOne(newSeriesOneToOne);
27167
27164
  setActiveColumnOneToOne([true].concat(dataConvertedOneToOne.map(function (_i) {
27168
27165
  return false;
27169
27166
  }).splice(0, dataConvertedOneToOne.length - 2)));
27170
27167
  setAvgOneToOne(newAvgOneToOne === null || newAvgOneToOne === void 0 ? void 0 : newAvgOneToOne.map(function (_, index) {
27171
27168
  return activeColumnOneToOne[index] ? newAvgOneToOne[index] : 0;
27172
27169
  }));
27170
+ setSeriesOneToOne(newSeriesOneToOne === null || newSeriesOneToOne === void 0 ? void 0 : newSeriesOneToOne.filter(function (_, idx) {
27171
+ return activeColumnOneToOne[idx];
27172
+ }));
27173
27173
  }, [chartOneToOneData.overviewQuestionChoice]);
27174
27174
 
27175
27175
  var _useState23 = useState([]),
@@ -27204,7 +27204,9 @@ var useDashboard = function useDashboard() {
27204
27204
  };
27205
27205
 
27206
27206
  useEffect(function () {
27207
- setSeriesClassReflection(newSeriesClassReflection);
27207
+ setSeriesClassReflection(newSeriesClassReflection === null || newSeriesClassReflection === void 0 ? void 0 : newSeriesClassReflection.filter(function (_, idx) {
27208
+ return activeColumnClassReflection[idx];
27209
+ }));
27208
27210
  setActiveColumnClassReflection([true].concat(dataConvertedClassReflection.map(function (_i) {
27209
27211
  return false;
27210
27212
  }).splice(0, dataConvertedClassReflection.length - 2)));
@@ -27245,12 +27247,14 @@ var useDashboard = function useDashboard() {
27245
27247
  };
27246
27248
 
27247
27249
  useEffect(function () {
27248
- setSeriesConference(newSeriesConference);
27250
+ setSeriesConference(newSeriesConference === null || newSeriesConference === void 0 ? void 0 : newSeriesConference.filter(function (_, idx) {
27251
+ return activeColumnConference[idx];
27252
+ }));
27249
27253
  setActiveColumnConference([true].concat(dataConvertedConference === null || dataConvertedConference === void 0 ? void 0 : dataConvertedConference.map(function (_i) {
27250
27254
  return false;
27251
27255
  }).splice(0, dataConvertedConference.length - 2)));
27252
27256
  setAvgConference(newAvgConference === null || newAvgConference === void 0 ? void 0 : newAvgConference.map(function (_, idx) {
27253
- return newAvgConference[idx];
27257
+ return activeColumnConference[idx] ? newAvgConference[idx] : 0;
27254
27258
  }));
27255
27259
  }, [chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice]);
27256
27260
 
@@ -27716,7 +27720,7 @@ var useChartDatas = function useChartDatas() {
27716
27720
  }]
27717
27721
  }, {
27718
27722
  id: "Student_by_age",
27719
- label: "Student by Age",
27723
+ label: "Student by Designation",
27720
27724
  children: function children(_, columnFlex) {
27721
27725
  return React.createElement(StudentByAgeAndGender$1, {
27722
27726
  columnFlex: columnFlex,
@@ -27737,8 +27741,8 @@ var useChartDatas = function useChartDatas() {
27737
27741
  isShowChangeChart: false,
27738
27742
  options: []
27739
27743
  }];
27740
- var initialTypeChart = chartDashBoards.map(function () {
27741
- return TYPECHART.AREA;
27744
+ var initialTypeChart = chartDashBoards.map(function (i) {
27745
+ return i.options.length > 0 ? i.options[0].value : TYPECHART.AREA;
27742
27746
  });
27743
27747
  var totalCardData = [{
27744
27748
  icon: "images/icon_chart.png",
@@ -29417,7 +29421,7 @@ var Dashboard = function Dashboard() {
29417
29421
  isShowChangeChart: chartDashBoard.isShowChangeChart,
29418
29422
  typeChart: typeChartList[index],
29419
29423
  onChangeChart: function onChangeChart(type) {
29420
- return _onChangeChart(index, type);
29424
+ return _onChangeChart(index, type, chartDashBoard === null || chartDashBoard === void 0 ? void 0 : chartDashBoard.options);
29421
29425
  },
29422
29426
  isOpen: chartIsOpened[index],
29423
29427
  options: chartDashBoard.options