touchstudy-core 0.1.184 → 0.1.186

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,6 +1,6 @@
1
1
  import { QuestionGroupRequest } from "../../../utils/types";
2
2
  export declare const isSequentialQuestionGroups: (questionGroups: QuestionGroupRequest[]) => boolean;
3
- export declare const getQuestionGroupsAfterQuestionCountChanged: (questionGroups: QuestionGroupRequest[], questionCount: number, index: number, checkSequential?: boolean | undefined) => QuestionGroupRequest[] | undefined;
3
+ export declare const getQuestionGroupsAfterQuestionCountChanged: (questionGroups: QuestionGroupRequest[], questionCount: number, index: number, checkSequential?: boolean | undefined) => QuestionGroupRequest[];
4
4
  export declare const getPreviousQuestinGroupCategory: (values: any, key: string, paths: number[]) => any;
5
5
  export declare const generateNewQuestionGroup: (questionGroups: QuestionGroupRequest[], isMath: boolean) => QuestionGroupRequest;
6
6
  export declare const reduceToMathArticles: (data: any, isMath?: number | undefined) => any;
@@ -5,6 +5,7 @@ interface Props {
5
5
  avgData: number[];
6
6
  categories: string[];
7
7
  height?: number;
8
+ customTooltip?: (val: any) => string;
8
9
  }
9
10
  declare const HexagonChart: FC<Props>;
10
11
  export default HexagonChart;
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ isStudent: boolean;
4
+ examCode: string;
5
+ code: string;
6
+ examSessionId: number;
7
+ chapterId: number;
8
+ studentId: number;
9
+ }
10
+ declare const CategoriesOverallChartContainer: FC<Props>;
11
+ export default CategoriesOverallChartContainer;
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ isStudent: boolean;
4
+ examCode: string;
5
+ code: string;
6
+ examSessionId: number;
7
+ chapterId: number;
8
+ studentId: number;
9
+ }
10
+ declare const OverallChartContainer: FC<Props>;
11
+ export default OverallChartContainer;
@@ -1,5 +1,11 @@
1
1
  import { FC } from "react";
2
2
  interface Props {
3
+ isStudent: boolean;
4
+ examCode: string;
5
+ code: string;
6
+ examSessionId: number;
7
+ chapterId: number;
8
+ studentId: number;
3
9
  }
4
10
  declare const OverallTab: FC<Props>;
5
11
  export default OverallTab;
@@ -0,0 +1,6 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ title: string;
4
+ }
5
+ declare const OverallTabHeader: FC<Props>;
6
+ export default OverallTabHeader;
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ isStudent: boolean;
4
+ examCode: string;
5
+ code: string;
6
+ examSessionId: number;
7
+ chapterId: number;
8
+ studentId: number;
9
+ }
10
+ declare const OverallTimeChartContainer: FC<Props>;
11
+ export default OverallTimeChartContainer;
package/dist/index.js CHANGED
@@ -11952,6 +11952,13 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
11952
11952
  var handleChangeCategory = function handleChangeCategory(val) {
11953
11953
  setFieldValue(path + ".articles[0].categoryOptions", val !== null && val !== void 0 && val.value ? [val] : []);
11954
11954
  setFieldValue(path + ".articles[0].categories", val !== null && val !== void 0 && val.value ? [val.value] : []);
11955
+ var questions = data.questions;
11956
+ setFieldValue(path + ".questions", questions.map(function (q) {
11957
+ return _extends({}, q, {
11958
+ questionTypeId: null,
11959
+ questionType: null
11960
+ });
11961
+ }));
11955
11962
  };
11956
11963
  var handleChangeSubCategory = function handleChangeSubCategory(val) {
11957
11964
  if (!(val !== null && val !== void 0 && val.value)) {
@@ -11964,6 +11971,13 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
11964
11971
  setFieldValue(path + ".articles[0].categories[1]", val.value);
11965
11972
  setFieldValue(path + ".articles[0].categoryOptions[1]", val);
11966
11973
  }
11974
+ var questions = data.questions;
11975
+ setFieldValue(path + ".questions", questions.map(function (q) {
11976
+ return _extends({}, q, {
11977
+ questionTypeId: null,
11978
+ questionType: null
11979
+ });
11980
+ }));
11967
11981
  };
11968
11982
  var summary = open ? "" : [t("number_questions", {
11969
11983
  n: data.questionCount
@@ -12348,7 +12362,7 @@ var isSequentialQuestionGroups = function isSequentialQuestionGroups(questionGro
12348
12362
  };
12349
12363
  var getQuestionGroupsAfterQuestionCountChanged = function getQuestionGroupsAfterQuestionCountChanged(questionGroups, questionCount, index, checkSequential) {
12350
12364
  var currentQuestionGroup = questionGroups[index];
12351
- if (currentQuestionGroup.questionCount === questionCount) return;
12365
+ if (currentQuestionGroup.questionCount === questionCount) return questionGroups;
12352
12366
  var prevQuestionGroups = index === 0 ? [] : questionGroups.slice(0, index);
12353
12367
  var nextQuestionGroups = index === questionGroups.length - 1 ? [] : questionGroups.slice(index + 1);
12354
12368
  var questions = currentQuestionGroup.questions;
@@ -12445,6 +12459,8 @@ var _reduceToMathArticles = function reduceToMathArticles(data, isMath) {
12445
12459
  if (key === "articles") {
12446
12460
  var _values$key;
12447
12461
  values[key] = (_values$key = values[key]) !== null && _values$key !== void 0 && _values$key.length ? [values[key][0]] : [DEFAULT_ARTICLE];
12462
+ } else if (key === "questionType" || key === "questionTypeId") {
12463
+ values[key] = null;
12448
12464
  } else if (typeof values[key] === "object" && values[key] !== null) {
12449
12465
  _reduceToMathArticles(values[key]);
12450
12466
  }
@@ -15581,7 +15597,7 @@ var LessonTooltip = function LessonTooltip(_ref) {
15581
15597
  fontSize: "14px",
15582
15598
  fontWeight: "600"
15583
15599
  }
15584
- }, t("" + moment(lesson === null || lesson === void 0 ? void 0 : lesson.date).format(t("date_format"))))), React__default.createElement(material.Stack, {
15600
+ }, utcToLocalTime(lesson === null || lesson === void 0 ? void 0 : lesson.date, t("date_format")))), React__default.createElement(material.Stack, {
15585
15601
  display: "flex",
15586
15602
  flexDirection: "row",
15587
15603
  justifyContent: "space-between",