touchstudy-core 0.1.156 → 0.1.158

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.
@@ -5,6 +5,7 @@ interface Props {
5
5
  onChange: Function;
6
6
  isDisabled?: boolean;
7
7
  rest?: any;
8
+ totalQuestions?: number;
8
9
  }
9
10
  declare const QuestionCountSelector: FC<Props>;
10
11
  export default QuestionCountSelector;
@@ -93,3 +93,4 @@ export declare const CompareTypeOptions: {
93
93
  label: string;
94
94
  value: QuestionAnswerType;
95
95
  }[];
96
+ export declare const MAX_QUESTIONS_IN_QUESTION_GROUP = 20;
package/dist/index.js CHANGED
@@ -7623,10 +7623,22 @@ var QuestionCountSelector = function QuestionCountSelector(_ref) {
7623
7623
  value = _ref.value,
7624
7624
  onChange = _ref.onChange,
7625
7625
  isDisabled = _ref.isDisabled,
7626
- rest = _ref.rest;
7626
+ rest = _ref.rest,
7627
+ totalQuestions = _ref.totalQuestions;
7627
7628
  var _useTranslation = reactI18next.useTranslation(),
7628
7629
  t = _useTranslation.t;
7629
- var questionOptions = QUESTION_OPTIONS.map(function (i) {
7630
+ var questionOptions = totalQuestions && totalQuestions > 1 ? Array.from({
7631
+ length: totalQuestions
7632
+ }, function (_, i) {
7633
+ return i + 1;
7634
+ }).map(function (i) {
7635
+ return {
7636
+ label: t("question_count_format", {
7637
+ number: i
7638
+ }),
7639
+ value: i
7640
+ };
7641
+ }) : QUESTION_OPTIONS.map(function (i) {
7630
7642
  return {
7631
7643
  label: t("question_count_format", {
7632
7644
  number: i
@@ -10242,8 +10254,11 @@ var TinyEditor = function TinyEditor(_ref) {
10242
10254
  height: 150,
10243
10255
  menubar: false,
10244
10256
  readonly: false,
10257
+ external_plugins: {
10258
+ tiny_mce_wiris: '/editor/wiris-for-tinymce.js'
10259
+ },
10245
10260
  plugins: ['anchor', 'autolink', 'charmap', 'codesample', 'emoticons', 'image', 'link', 'lists', 'media', 'searchreplace', 'table', 'visualblocks', 'wordcount'],
10246
- toolbar: 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table mergetags | addcomment showcomments | spellcheckdialog a11ycheck typography | align lineheight | checklist numlist bullist indent outdent | emoticons charmap | removeformat',
10261
+ toolbar: 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table mergetags | addcomment showcomments | spellcheckdialog a11ycheck typography | align lineheight | checklist numlist bullist indent outdent | emoticons charmap | removeformat | tiny_mce_wiris_formulaEditor | tiny_mce_wiris_formulaEditorChemistry',
10247
10262
  branding: false,
10248
10263
  extended_valid_elements: '*[.*]'
10249
10264
  };
@@ -10257,7 +10272,7 @@ var TinyEditor = function TinyEditor(_ref) {
10257
10272
  return React__default.createElement(tinymceReact.Editor, {
10258
10273
  disabled: disabled,
10259
10274
  init: config || options,
10260
- initialValue: initValue,
10275
+ value: initValue,
10261
10276
  onEditorChange: handleChange
10262
10277
  });
10263
10278
  };
@@ -33558,6 +33573,7 @@ var CompareTypeOptions = [{
33558
33573
  label: "synonym_processing",
33559
33574
  value: exports.QuestionAnswerType.SynonymProcessing
33560
33575
  }];
33576
+ var MAX_QUESTIONS_IN_QUESTION_GROUP = 20;
33561
33577
 
33562
33578
  var CustomTextbookTab = function CustomTextbookTab(props) {
33563
33579
  var children = props.children,
@@ -34892,7 +34908,8 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
34892
34908
  var field = _ref2.field;
34893
34909
  return React__default.createElement(QuestionCountSelector, Object.assign({}, field, {
34894
34910
  onChange: handleChangeQuestionCount,
34895
- isDisabled: disabled
34911
+ isDisabled: disabled,
34912
+ totalQuestions: MAX_QUESTIONS_IN_QUESTION_GROUP
34896
34913
  }));
34897
34914
  }
34898
34915
  }))), isMath && React__default.createElement(material.Grid, {
@@ -36208,6 +36225,7 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
36208
36225
  onChange: function onChange(event) {
36209
36226
  return !disabled && handleUploadImage(event);
36210
36227
  },
36228
+ disabled: disabled,
36211
36229
  onClick: function onClick(e) {
36212
36230
  if (!disabled) {
36213
36231
  e.target.value = "";
@@ -36847,7 +36865,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
36847
36865
  }, React__default.createElement(material.FormLabel, {
36848
36866
  htmlFor: "type",
36849
36867
  className: "text-center"
36850
- }, i18n.t("korea")), React__default.createElement(formik.Field, {
36868
+ }, i18n.t("korean_language")), React__default.createElement(formik.Field, {
36851
36869
  name: "type",
36852
36870
  render: function render(_ref4) {
36853
36871
  var field = _ref4.field;