mario-education 2.4.70-beta → 2.4.80-beta

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.
@@ -4,6 +4,7 @@ interface IProps {
4
4
  months: string[];
5
5
  activeColumn: boolean[];
6
6
  series: ISeries[];
7
+ dayOfWeek: string[];
7
8
  }
8
9
  declare const AreaChart: FC<IProps>;
9
10
  export default AreaChart;
@@ -5,6 +5,7 @@ interface IProps {
5
5
  activeColumn: boolean[];
6
6
  series: ISeries[];
7
7
  isHasLineChart: boolean;
8
+ dayOfWeek: string[];
8
9
  }
9
10
  declare const BarAndAreaChart: FC<IProps>;
10
11
  export default BarAndAreaChart;
@@ -4,6 +4,7 @@ interface IProps {
4
4
  months: string[];
5
5
  activeColumn: boolean[];
6
6
  series: ISeries[];
7
+ dayOfWeek: string[];
7
8
  }
8
9
  declare const BarChart: FC<IProps>;
9
10
  export default BarChart;
@@ -12,6 +12,7 @@ export interface IProps {
12
12
  series: ISeries[];
13
13
  avg: number[];
14
14
  months: any;
15
+ dayOfWeek?: string[];
15
16
  }
16
17
  declare const _default: React.NamedExoticComponent<IProps>;
17
18
  export default _default;
@@ -4,6 +4,7 @@ interface IProps {
4
4
  months: string[];
5
5
  activeColumn: boolean[];
6
6
  series: ISeries[];
7
+ dayOfWeek: string[];
7
8
  }
8
9
  declare const LineChart: FC<IProps>;
9
10
  export default LineChart;
@@ -156,6 +156,8 @@ export interface IResultQuestion {
156
156
  export interface IOverviewQuestionChoice {
157
157
  month: string;
158
158
  resultQuestion: IResultQuestion[];
159
+ endDate: string;
160
+ startDate: string;
159
161
  }
160
162
  export interface IColumnChartAndPercent {
161
163
  overviewQuestionChoice: IOverviewQuestionChoice[];
@@ -102,9 +102,9 @@ export declare const convertDataToSeriesBullderChart: (data: IReadinessToLearnin
102
102
  name: string;
103
103
  data: import("react").ReactText[][];
104
104
  }[];
105
- export declare const optionColumnChartAndPercents: (months: string[], activeData: boolean[], isRidgeCharts: boolean) => ApexOptions;
106
- export declare const optionLineChart: (months: string[], activeData: boolean[]) => ApexOptions;
107
- export declare const optionBarChartAndArea: (months: string[], activeData: boolean[], newseries?: any) => ApexOptions;
105
+ export declare const optionColumnChartAndPercents: (months: string[], activeData: boolean[], isRidgeCharts: boolean, dayOfWeek: string[]) => ApexOptions;
106
+ export declare const optionLineChart: (months: string[], activeData: boolean[], dayOfWeek: string[]) => ApexOptions;
107
+ export declare const optionBarChartAndArea: (months: string[], activeData: boolean[], dayOfWeek: string[], newseries?: any) => ApexOptions;
108
108
  export declare const convertDataToDataChart: (data: IOverviewQuestionChoice[]) => string[];
109
109
  export declare const convertToSeriesColumnChartAndPercent: (dataCharts: string[], data: IOverviewQuestionChoice[]) => {
110
110
  name: string;
@@ -66,5 +66,9 @@ declare const useDashboard: () => {
66
66
  filterLearningStrategiesTable: any;
67
67
  changeFiltersLearningStrategiesTable: (updatedFilter: any) => void;
68
68
  getLearningStrategiesTableData: () => Promise<void>;
69
+ dayOfWeekOneToOne: string[];
70
+ dayOfWeekConference: string[];
71
+ dayOfWeekReflection: string[];
72
+ dayOfWeekSafety: string[];
69
73
  };
70
74
  export default useDashboard;
package/dist/index.js CHANGED
@@ -27627,7 +27627,7 @@ var convertDataToSeriesBullderChart = function convertDataToSeriesBullderChart(d
27627
27627
  };
27628
27628
  });
27629
27629
  };
27630
- var optionColumnChartAndPercents = function optionColumnChartAndPercents(months, activeData, isRidgeCharts) {
27630
+ var optionColumnChartAndPercents = function optionColumnChartAndPercents(months, activeData, isRidgeCharts, dayOfWeek) {
27631
27631
  return {
27632
27632
  chart: {
27633
27633
  height: 350,
@@ -27708,6 +27708,11 @@ var optionColumnChartAndPercents = function optionColumnChartAndPercents(months,
27708
27708
  return value.toFixed(2) + "%";
27709
27709
  }
27710
27710
  },
27711
+ x: {
27712
+ formatter: function formatter(value, opts) {
27713
+ return dayOfWeek[opts === null || opts === void 0 ? void 0 : opts.dataPointIndex] || value.toString();
27714
+ }
27715
+ },
27711
27716
  onDatasetHover: {
27712
27717
  highlightDataSeries: true
27713
27718
  }
@@ -27717,7 +27722,7 @@ var optionColumnChartAndPercents = function optionColumnChartAndPercents(months,
27717
27722
  }
27718
27723
  };
27719
27724
  };
27720
- var optionLineChart = function optionLineChart(months, activeData) {
27725
+ var optionLineChart = function optionLineChart(months, activeData, dayOfWeek) {
27721
27726
  return {
27722
27727
  chart: {
27723
27728
  height: 350,
@@ -27788,6 +27793,11 @@ var optionLineChart = function optionLineChart(months, activeData) {
27788
27793
  return value.toFixed(2) + "%";
27789
27794
  }
27790
27795
  },
27796
+ x: {
27797
+ formatter: function formatter(value, opts) {
27798
+ return dayOfWeek[opts === null || opts === void 0 ? void 0 : opts.dataPointIndex] || value.toString();
27799
+ }
27800
+ },
27791
27801
  onDatasetHover: {
27792
27802
  highlightDataSeries: true
27793
27803
  }
@@ -27797,7 +27807,7 @@ var optionLineChart = function optionLineChart(months, activeData) {
27797
27807
  }
27798
27808
  };
27799
27809
  };
27800
- var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, newseries) {
27810
+ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, dayOfWeek, newseries) {
27801
27811
  return {
27802
27812
  chart: {
27803
27813
  height: 350,
@@ -27887,6 +27897,11 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, n
27887
27897
  return value.toFixed(2) + "%";
27888
27898
  }
27889
27899
  },
27900
+ x: {
27901
+ formatter: function formatter(value, opts) {
27902
+ return dayOfWeek[opts === null || opts === void 0 ? void 0 : opts.dataPointIndex] || value.toString();
27903
+ }
27904
+ },
27890
27905
  onDatasetHover: {
27891
27906
  highlightDataSeries: true
27892
27907
  }
@@ -28047,9 +28062,10 @@ var BubbleChartCustom$1 = React__default.memo(BubbleChartCustom, propsAreEqual);
28047
28062
  var AreaChart = function AreaChart(_ref) {
28048
28063
  var series = _ref.series,
28049
28064
  months = _ref.months,
28050
- activeColumn = _ref.activeColumn;
28065
+ activeColumn = _ref.activeColumn,
28066
+ dayOfWeek = _ref.dayOfWeek;
28051
28067
  return React__default.createElement(Chart, {
28052
- options: optionColumnChartAndPercents(months, activeColumn, true),
28068
+ options: optionColumnChartAndPercents(months, activeColumn, true, dayOfWeek),
28053
28069
  type: "area",
28054
28070
  series: series,
28055
28071
  width: "100%",
@@ -28060,9 +28076,10 @@ var AreaChart = function AreaChart(_ref) {
28060
28076
  var BarChart = function BarChart(_ref) {
28061
28077
  var series = _ref.series,
28062
28078
  months = _ref.months,
28063
- activeColumn = _ref.activeColumn;
28079
+ activeColumn = _ref.activeColumn,
28080
+ dayOfWeek = _ref.dayOfWeek;
28064
28081
  return React__default.createElement(Chart, {
28065
- options: optionColumnChartAndPercents(months, activeColumn, false),
28082
+ options: optionColumnChartAndPercents(months, activeColumn, false, dayOfWeek),
28066
28083
  type: "bar",
28067
28084
  series: series,
28068
28085
  width: "100%",
@@ -28075,10 +28092,11 @@ var BarAndAreaChart = function BarAndAreaChart(_ref) {
28075
28092
  months = _ref.months,
28076
28093
  activeColumn = _ref.activeColumn,
28077
28094
  _ref$isHasLineChart = _ref.isHasLineChart,
28078
- isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart;
28095
+ isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart,
28096
+ dayOfWeek = _ref.dayOfWeek;
28079
28097
  var newseries = mergeBarChartAndArea(series, isHasLineChart);
28080
28098
  return React__default.createElement(Chart, {
28081
- options: optionBarChartAndArea(months, activeColumn, newseries),
28099
+ options: optionBarChartAndArea(months, activeColumn, dayOfWeek, newseries),
28082
28100
  series: newseries,
28083
28101
  width: "100%",
28084
28102
  height: 450
@@ -28088,9 +28106,10 @@ var BarAndAreaChart = function BarAndAreaChart(_ref) {
28088
28106
  var LineChart = function LineChart(_ref) {
28089
28107
  var series = _ref.series,
28090
28108
  months = _ref.months,
28091
- activeColumn = _ref.activeColumn;
28109
+ activeColumn = _ref.activeColumn,
28110
+ dayOfWeek = _ref.dayOfWeek;
28092
28111
  return React__default.createElement(Chart, {
28093
- options: optionLineChart(months, activeColumn),
28112
+ options: optionLineChart(months, activeColumn, dayOfWeek),
28094
28113
  type: "line",
28095
28114
  series: series,
28096
28115
  width: "100%",
@@ -28104,6 +28123,8 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
28104
28123
  typeChart = _ref$typeChart === void 0 ? TYPECHART.BAR : _ref$typeChart,
28105
28124
  _ref$isHasLineChart = _ref.isHasLineChart,
28106
28125
  isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart,
28126
+ _ref$dayOfWeek = _ref.dayOfWeek,
28127
+ dayOfWeek = _ref$dayOfWeek === void 0 ? [] : _ref$dayOfWeek,
28107
28128
  onActiveColumn = _ref.onActiveColumn,
28108
28129
  activeColumn = _ref.activeColumn,
28109
28130
  series = _ref.series,
@@ -28152,20 +28173,24 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
28152
28173
  }, typeChart === TYPECHART.AREA && React__default.createElement(AreaChart, {
28153
28174
  months: months,
28154
28175
  activeColumn: activeColumn,
28155
- series: series
28176
+ series: series,
28177
+ dayOfWeek: dayOfWeek
28156
28178
  }), typeChart === TYPECHART.BAR && React__default.createElement(BarChart, {
28157
28179
  months: months,
28158
28180
  activeColumn: activeColumn,
28159
- series: series
28181
+ series: series,
28182
+ dayOfWeek: dayOfWeek
28160
28183
  }), typeChart === TYPECHART.BOTH && React__default.createElement(BarAndAreaChart, {
28161
28184
  months: months,
28185
+ dayOfWeek: dayOfWeek,
28162
28186
  activeColumn: activeColumn,
28163
28187
  series: series,
28164
28188
  isHasLineChart: isHasLineChart
28165
28189
  }), typeChart === TYPECHART.LINE && React__default.createElement(LineChart, {
28166
28190
  months: months,
28167
28191
  activeColumn: activeColumn,
28168
- series: series
28192
+ series: series,
28193
+ dayOfWeek: dayOfWeek
28169
28194
  })), !isPDF && React__default.createElement("div", {
28170
28195
  className: "w-100 d-flex gap-2 flex-wrap " + styles$1["listItem"]
28171
28196
  }, data.map(function (month, index) {
@@ -28665,6 +28690,9 @@ var useDashboard = function useDashboard() {
28665
28690
  var monthsOneToOne = chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : chartOneToOneData.overviewQuestionChoice.map(function (i) {
28666
28691
  return (i === null || i === void 0 ? void 0 : i.month) || "";
28667
28692
  });
28693
+ var dayOfWeekOneToOne = chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : chartOneToOneData.overviewQuestionChoice.map(function (r) {
28694
+ return marioCore.utcToLocalTime(r.startDate, "DD-MM-yyyy") + " - " + marioCore.utcToLocalTime(r.endDate, "DD-MM-yyyy");
28695
+ });
28668
28696
  var dataConvertedOneToOne = convertDataToDataChart(chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : chartOneToOneData.overviewQuestionChoice);
28669
28697
  var newSeriesOneToOne = convertToSeriesColumnChartAndPercent(dataConvertedOneToOne, chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : chartOneToOneData.overviewQuestionChoice);
28670
28698
  var newAvgOneToOne = convertToAvg(dataConvertedOneToOne, chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : chartOneToOneData.overviewQuestionChoice, monthsOneToOne);
@@ -28746,6 +28774,9 @@ var useDashboard = function useDashboard() {
28746
28774
  var monthsClassReflection = chartClassReflection === null || chartClassReflection === void 0 ? void 0 : chartClassReflection.overviewQuestionChoice.map(function (i) {
28747
28775
  return (i === null || i === void 0 ? void 0 : i.month) || "";
28748
28776
  });
28777
+ var dayOfWeekReflection = chartClassReflection === null || chartClassReflection === void 0 ? void 0 : chartClassReflection.overviewQuestionChoice.map(function (r) {
28778
+ return marioCore.utcToLocalTime(r.startDate, "DD-MM-yyyy") + " - " + marioCore.utcToLocalTime(r.endDate, "DD-MM-yyyy");
28779
+ });
28749
28780
  var dataConvertedClassReflection = convertDataToDataChart(chartClassReflection === null || chartClassReflection === void 0 ? void 0 : chartClassReflection.overviewQuestionChoice);
28750
28781
  var newSeriesClassReflection = convertToSeriesColumnChartAndPercent(dataConvertedClassReflection, chartClassReflection === null || chartClassReflection === void 0 ? void 0 : chartClassReflection.overviewQuestionChoice);
28751
28782
  var newAvgClassReflection = convertToAvg(dataConvertedClassReflection, chartClassReflection === null || chartClassReflection === void 0 ? void 0 : chartClassReflection.overviewQuestionChoice, monthsClassReflection);
@@ -28789,6 +28820,9 @@ var useDashboard = function useDashboard() {
28789
28820
  var monthsConference = chartConference === null || chartConference === void 0 ? void 0 : (_chartConference$over = chartConference.overviewQuestionChoice) === null || _chartConference$over === void 0 ? void 0 : _chartConference$over.map(function (i) {
28790
28821
  return (i === null || i === void 0 ? void 0 : i.month) || "";
28791
28822
  });
28823
+ var dayOfWeekConference = chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice.map(function (r) {
28824
+ return marioCore.utcToLocalTime(r.startDate, "DD-MM-yyyy") + " - " + marioCore.utcToLocalTime(r.endDate, "DD-MM-yyyy");
28825
+ });
28792
28826
  var dataConvertedConference = convertDataToDataChart(chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice);
28793
28827
  var newSeriesConference = convertToSeriesColumnChartAndPercent(dataConvertedConference, chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice);
28794
28828
  var newAvgConference = convertToAvg(dataConvertedConference, chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice, monthsConference);
@@ -28832,6 +28866,9 @@ var useDashboard = function useDashboard() {
28832
28866
  var monthsSafety = safety === null || safety === void 0 ? void 0 : (_safety$overviewQuest = safety.overviewQuestionChoice) === null || _safety$overviewQuest === void 0 ? void 0 : _safety$overviewQuest.map(function (i) {
28833
28867
  return (i === null || i === void 0 ? void 0 : i.month) || "";
28834
28868
  });
28869
+ var dayOfWeekSafety = safety === null || safety === void 0 ? void 0 : safety.overviewQuestionChoice.map(function (r) {
28870
+ return marioCore.utcToLocalTime(r.startDate, "DD-MM-yyyy") + " - " + marioCore.utcToLocalTime(r.endDate, "DD-MM-yyyy");
28871
+ });
28835
28872
  var dataConvertedSafety = convertDataToDataChart(safety === null || safety === void 0 ? void 0 : safety.overviewQuestionChoice);
28836
28873
  var newSeriesSafety = convertToSeriesColumnChartAndPercent(dataConvertedSafety, safety === null || safety === void 0 ? void 0 : safety.overviewQuestionChoice);
28837
28874
  var newAvgSafety = convertToAvg(dataConvertedSafety, safety === null || safety === void 0 ? void 0 : safety.overviewQuestionChoice, monthsSafety);
@@ -29035,7 +29072,11 @@ var useDashboard = function useDashboard() {
29035
29072
  handleOpenCloseLearningStrategiesTable: handleOpenCloseLearningStrategiesTable,
29036
29073
  filterLearningStrategiesTable: filterLearningStrategiesTable,
29037
29074
  changeFiltersLearningStrategiesTable: changeFiltersLearningStrategiesTable,
29038
- getLearningStrategiesTableData: getLearningStrategiesTableData
29075
+ getLearningStrategiesTableData: getLearningStrategiesTableData,
29076
+ dayOfWeekOneToOne: dayOfWeekOneToOne,
29077
+ dayOfWeekConference: dayOfWeekConference,
29078
+ dayOfWeekReflection: dayOfWeekReflection,
29079
+ dayOfWeekSafety: dayOfWeekSafety
29039
29080
  };
29040
29081
  };
29041
29082
 
@@ -29095,7 +29136,11 @@ var useChartDatas = function useChartDatas() {
29095
29136
  handleOpenCloseLearningStrategiesTable = _useDashboard.handleOpenCloseLearningStrategiesTable,
29096
29137
  filterLearningStrategiesTable = _useDashboard.filterLearningStrategiesTable,
29097
29138
  changeFiltersLearningStrategiesTable = _useDashboard.changeFiltersLearningStrategiesTable,
29098
- getLearningStrategiesTableData = _useDashboard.getLearningStrategiesTableData;
29139
+ getLearningStrategiesTableData = _useDashboard.getLearningStrategiesTableData,
29140
+ dayOfWeekOneToOne = _useDashboard.dayOfWeekOneToOne,
29141
+ dayOfWeekReflection = _useDashboard.dayOfWeekReflection,
29142
+ dayOfWeekConference = _useDashboard.dayOfWeekConference,
29143
+ dayOfWeekSafety = _useDashboard.dayOfWeekSafety;
29099
29144
 
29100
29145
  var _useState = React.useState([]),
29101
29146
  selectedToPrint = _useState[0],
@@ -29250,6 +29295,7 @@ var useChartDatas = function useChartDatas() {
29250
29295
  series: seriesOneToOne,
29251
29296
  avg: avgOneToOne,
29252
29297
  months: monthsOneToOne,
29298
+ dayOfWeek: dayOfWeekOneToOne,
29253
29299
  isPDF: isPDF
29254
29300
  });
29255
29301
  },
@@ -29277,7 +29323,8 @@ var useChartDatas = function useChartDatas() {
29277
29323
  series: seriesClassRefection,
29278
29324
  avg: avgClassReflection,
29279
29325
  months: monthsClassReflection,
29280
- isPDF: isPDF
29326
+ isPDF: isPDF,
29327
+ dayOfWeek: dayOfWeekReflection
29281
29328
  });
29282
29329
  },
29283
29330
  isShowChangeChart: true,
@@ -29303,7 +29350,8 @@ var useChartDatas = function useChartDatas() {
29303
29350
  series: seriesConference,
29304
29351
  avg: avgConference,
29305
29352
  months: monthsConference,
29306
- isPDF: isPDF
29353
+ isPDF: isPDF,
29354
+ dayOfWeek: dayOfWeekConference
29307
29355
  });
29308
29356
  },
29309
29357
  isShowChangeChart: true,
@@ -29330,7 +29378,8 @@ var useChartDatas = function useChartDatas() {
29330
29378
  series: seriesSafety,
29331
29379
  avg: avgSafety,
29332
29380
  months: monthsSafety,
29333
- isPDF: isPDF
29381
+ isPDF: isPDF,
29382
+ dayOfWeek: dayOfWeekSafety
29334
29383
  });
29335
29384
  },
29336
29385
  isShowChangeChart: true,