touchstudy-core 0.1.155 → 0.1.157

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.
@@ -8,7 +8,7 @@ export interface VirtualTableViewProps {
8
8
  columnCount: number;
9
9
  listHeight?: number;
10
10
  listWidth?: number;
11
- containerRef?: RefObject<HTMLDivElement>;
11
+ containerRef: RefObject<HTMLDivElement>;
12
12
  multiGridRef?: RefObject<MultiGrid>;
13
13
  overscanRowCount?: number;
14
14
  overscanColumnCount?: number;
package/dist/index.js CHANGED
@@ -10242,8 +10242,11 @@ var TinyEditor = function TinyEditor(_ref) {
10242
10242
  height: 150,
10243
10243
  menubar: false,
10244
10244
  readonly: false,
10245
+ external_plugins: {
10246
+ tiny_mce_wiris: '/editor/wiris-for-tinymce.js'
10247
+ },
10245
10248
  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',
10249
+ 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
10250
  branding: false,
10248
10251
  extended_valid_elements: '*[.*]'
10249
10252
  };
@@ -10257,7 +10260,7 @@ var TinyEditor = function TinyEditor(_ref) {
10257
10260
  return React__default.createElement(tinymceReact.Editor, {
10258
10261
  disabled: disabled,
10259
10262
  init: config || options,
10260
- initialValue: initValue,
10263
+ value: initValue,
10261
10264
  onEditorChange: handleChange
10262
10265
  });
10263
10266
  };
@@ -24475,6 +24478,7 @@ var AttendanceCourseTable = function AttendanceCourseTable(_ref) {
24475
24478
  return state === null || state === void 0 ? void 0 : (_state$common2 = state.common) === null || _state$common2 === void 0 ? void 0 : _state$common2.language;
24476
24479
  });
24477
24480
  var dataString = JSON.stringify(data);
24481
+ var containerRef = React.useRef(null);
24478
24482
  var handleCheckInLesson = function handleCheckInLesson(lesson, studentId) {
24479
24483
  if (isAdmin) return;
24480
24484
  onCheckInLesson(lesson, studentId);
@@ -24532,15 +24536,43 @@ var AttendanceCourseTable = function AttendanceCourseTable(_ref) {
24532
24536
  }, (attendance === null || attendance === void 0 ? void 0 : attendance.status) === StudentAttendanceStatus.Late ? React__default.createElement(AlertCircleFill, null) : (attendance === null || attendance === void 0 ? void 0 : attendance.status) === StudentAttendanceStatus.Attended ? React__default.createElement(CheckCircleFill, null) : React__default.createElement(CloseCircleFill, null))));
24533
24537
  };
24534
24538
  var columnCount = data.length;
24539
+ var multiGridRef = React.useRef(null);
24540
+ React.useEffect(function () {
24541
+ var handleResize = function handleResize() {
24542
+ var _multiGridRef$current;
24543
+ (_multiGridRef$current = multiGridRef.current) === null || _multiGridRef$current === void 0 ? void 0 : _multiGridRef$current.invalidateCellSizeAfterRender();
24544
+ };
24545
+ window.addEventListener("resize", handleResize);
24546
+ return function () {
24547
+ window.removeEventListener("resize", handleResize);
24548
+ };
24549
+ }, []);
24550
+ var columnWidth = function columnWidth(params, cache) {
24551
+ if (!containerRef.current || params.index < columnCount - 1) return cache.columnWidth(params);
24552
+ var containerWidth = containerRef.current.clientWidth;
24553
+ var currentWidth = cache.columnWidth(params);
24554
+ var totalWidth = 0;
24555
+ for (var index = 0; index < params.index; index++) {
24556
+ var elementWidth = cache.columnWidth({
24557
+ index: index
24558
+ });
24559
+ totalWidth += elementWidth;
24560
+ }
24561
+ if (totalWidth + currentWidth < containerWidth) return containerWidth - totalWidth;
24562
+ return currentWidth;
24563
+ };
24535
24564
  return React__default.createElement(VirtualTableView, {
24536
24565
  loading: false,
24566
+ multiGridRef: multiGridRef,
24567
+ containerRef: containerRef,
24537
24568
  containerProps: containerProps,
24538
24569
  listHeight: listHeight,
24539
24570
  listWidth: listWidth,
24540
24571
  renderItem: renderItem,
24541
24572
  columnCount: columnCount,
24542
24573
  itemsCount: 2,
24543
- dataString: dataString
24574
+ dataString: dataString,
24575
+ columnWidth: columnWidth
24544
24576
  });
24545
24577
  };
24546
24578