touchstudy-core 0.1.164 → 0.1.165

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,6 +23,7 @@ export interface ExamNoteDialogProps {
23
23
  onSaveNote: (content: string, questionId: number) => void;
24
24
  }
25
25
  export interface ClassNoteDialogProps {
26
+ id?: string;
26
27
  open: boolean;
27
28
  tip?: string;
28
29
  studentName?: string;
package/dist/index.js CHANGED
@@ -14530,7 +14530,9 @@ var schema$1 = yup.object().shape({
14530
14530
  content: yup.string().required()
14531
14531
  });
14532
14532
  var ClassNoteDialog = function ClassNoteDialog(_ref) {
14533
- var open = _ref.open,
14533
+ var _ref$id = _ref.id,
14534
+ id = _ref$id === void 0 ? "class-note-dialog" : _ref$id,
14535
+ open = _ref.open,
14534
14536
  studentName = _ref.studentName,
14535
14537
  selectedNote = _ref.selectedNote,
14536
14538
  tip = _ref.tip,
@@ -14542,12 +14544,26 @@ var ClassNoteDialog = function ClassNoteDialog(_ref) {
14542
14544
  var handleSaveNote = function handleSaveNote(content) {
14543
14545
  onSaveNote(content);
14544
14546
  };
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]);
14545
14560
  return React__default.createElement(material.Dialog, {
14546
14561
  onClose: onClose,
14547
14562
  open: open,
14548
14563
  maxWidth: "md",
14549
14564
  scroll: "body",
14550
- fullWidth: true
14565
+ fullWidth: true,
14566
+ id: id
14551
14567
  }, React__default.createElement(DialogTitle, {
14552
14568
  id: "customized-dialog-title"
14553
14569
  }, React__default.createElement(Typography, {
@@ -15089,6 +15105,12 @@ var NoteItem = function NoteItem(_ref) {
15089
15105
  React.useEffect(function () {
15090
15106
  onLoad === null || onLoad === void 0 ? void 0 : onLoad();
15091
15107
  }, []);
15108
+ React.useEffect(function () {
15109
+ if (window.MathJax) {
15110
+ var _window$MathJax;
15111
+ (_window$MathJax = window.MathJax) === null || _window$MathJax === void 0 ? void 0 : _window$MathJax.typeset();
15112
+ }
15113
+ }, [data.content]);
15092
15114
  return React__default.createElement(material.Box, Object.assign({}, NoteItemStyles.root, {
15093
15115
  onClick: handleItemClick,
15094
15116
  sx: {
@@ -15202,6 +15224,12 @@ var NoteDrawer = function NoteDrawer(props) {
15202
15224
  var _state$common2;
15203
15225
  return state === null || state === void 0 ? void 0 : (_state$common2 = state.common) === null || _state$common2 === void 0 ? void 0 : _state$common2.language;
15204
15226
  });
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]);
15205
15233
  return React__default.createElement(material.Drawer, {
15206
15234
  anchor: anchor,
15207
15235
  open: open,