touchstudy-core 0.1.165 → 0.1.166

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.
@@ -23,7 +23,6 @@ export interface ExamNoteDialogProps {
23
23
  onSaveNote: (content: string, questionId: number) => void;
24
24
  }
25
25
  export interface ClassNoteDialogProps {
26
- id?: string;
27
26
  open: boolean;
28
27
  tip?: string;
29
28
  studentName?: string;
@@ -0,0 +1,6 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ content: string;
4
+ }
5
+ declare const NoteContent: FC<Props>;
6
+ export default NoteContent;
package/dist/index.js CHANGED
@@ -14505,7 +14505,7 @@ var NoteTinyEditor = function NoteTinyEditor(_ref) {
14505
14505
  external_plugins: {
14506
14506
  tiny_mce_wiris: '/editor/wiris-for-tinymce.js'
14507
14507
  },
14508
- plugins: ['anchor', 'autolink', 'charmap', 'codesample', 'emoticons', 'image', 'link', 'lists', 'media', 'searchreplace', 'table', 'textcolor', 'wordcount'],
14508
+ plugins: ['anchor', 'autolink', 'charmap', 'codesample', 'emoticons', 'image', 'link', 'lists', 'media', 'searchreplace', 'table', 'wordcount'],
14509
14509
  toolbar: 'undo redo | blocks fontfamily fontsize forecolor backcolor | 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',
14510
14510
  branding: false,
14511
14511
  extended_valid_elements: '*[.*]',
@@ -14530,9 +14530,7 @@ var schema$1 = yup.object().shape({
14530
14530
  content: yup.string().required()
14531
14531
  });
14532
14532
  var ClassNoteDialog = function ClassNoteDialog(_ref) {
14533
- var _ref$id = _ref.id,
14534
- id = _ref$id === void 0 ? "class-note-dialog" : _ref$id,
14535
- open = _ref.open,
14533
+ var open = _ref.open,
14536
14534
  studentName = _ref.studentName,
14537
14535
  selectedNote = _ref.selectedNote,
14538
14536
  tip = _ref.tip,
@@ -14544,26 +14542,14 @@ var ClassNoteDialog = function ClassNoteDialog(_ref) {
14544
14542
  var handleSaveNote = function handleSaveNote(content) {
14545
14543
  onSaveNote(content);
14546
14544
  };
14547
- React.useEffect(function () {
14548
- if (open) {
14549
- var _document$getElementB;
14550
- (_document$getElementB = document.getElementById(id)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.setAttribute("inert", "true");
14551
- } else {
14552
- var _document$getElementB2;
14553
- (_document$getElementB2 = document.getElementById(id)) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.removeAttribute("inert");
14554
- }
14555
- return function () {
14556
- var _document$getElementB3;
14557
- (_document$getElementB3 = document.getElementById(id)) === null || _document$getElementB3 === void 0 ? void 0 : _document$getElementB3.removeAttribute("inert");
14558
- };
14559
- }, [open, id]);
14560
14545
  return React__default.createElement(material.Dialog, {
14561
14546
  onClose: onClose,
14562
14547
  open: open,
14563
14548
  maxWidth: "md",
14564
14549
  scroll: "body",
14565
14550
  fullWidth: true,
14566
- id: id
14551
+ disableEnforceFocus: true,
14552
+ disableAutoFocus: true
14567
14553
  }, React__default.createElement(DialogTitle, {
14568
14554
  id: "customized-dialog-title"
14569
14555
  }, React__default.createElement(Typography, {
@@ -15204,8 +15190,28 @@ var NotesContainer = function NotesContainer(_ref) {
15204
15190
  });
15205
15191
  };
15206
15192
 
15193
+ var NoteContent = function NoteContent(_ref) {
15194
+ var content = _ref.content;
15195
+ React.useEffect(function () {
15196
+ if (window.MathJax) {
15197
+ var _window$MathJax;
15198
+ (_window$MathJax = window.MathJax) === null || _window$MathJax === void 0 ? void 0 : _window$MathJax.typeset();
15199
+ }
15200
+ }, [content]);
15201
+ return React__default.createElement(material.Box, {
15202
+ sx: {
15203
+ fontSize: "14px",
15204
+ fontWeight: "300",
15205
+ color: "#414E62"
15206
+ },
15207
+ dangerouslySetInnerHTML: {
15208
+ __html: content
15209
+ }
15210
+ });
15211
+ };
15212
+
15207
15213
  var NoteDrawer = function NoteDrawer(props) {
15208
- var _BRIEF_GRADE_OPTIONS$;
15214
+ var _BRIEF_GRADE_OPTIONS$, _data$content;
15209
15215
  var anchor = props.anchor,
15210
15216
  open = props.open,
15211
15217
  student = props.student,
@@ -15224,12 +15230,6 @@ var NoteDrawer = function NoteDrawer(props) {
15224
15230
  var _state$common2;
15225
15231
  return state === null || state === void 0 ? void 0 : (_state$common2 = state.common) === null || _state$common2 === void 0 ? void 0 : _state$common2.language;
15226
15232
  });
15227
- React.useEffect(function () {
15228
- if (window.MathJax) {
15229
- var _window$MathJax;
15230
- (_window$MathJax = window.MathJax) === null || _window$MathJax === void 0 ? void 0 : _window$MathJax.typeset();
15231
- }
15232
- }, [data === null || data === void 0 ? void 0 : data.content]);
15233
15233
  return React__default.createElement(material.Drawer, {
15234
15234
  anchor: anchor,
15235
15235
  open: open,
@@ -15345,15 +15345,8 @@ var NoteDrawer = function NoteDrawer(props) {
15345
15345
  color: "#97A1AF",
15346
15346
  textAlign: "end"
15347
15347
  }
15348
- }, academy === null || academy === void 0 ? void 0 : academy.name))), React__default.createElement(material.Box, {
15349
- sx: {
15350
- fontSize: "14px",
15351
- fontWeight: "300",
15352
- color: "#414E62"
15353
- },
15354
- dangerouslySetInnerHTML: {
15355
- __html: (data === null || data === void 0 ? void 0 : data.content) || ""
15356
- }
15348
+ }, academy === null || academy === void 0 ? void 0 : academy.name))), React__default.createElement(NoteContent, {
15349
+ content: (_data$content = data === null || data === void 0 ? void 0 : data.content) != null ? _data$content : ""
15357
15350
  })));
15358
15351
  };
15359
15352