@khanacademy/perseus-editor 2.6.1 → 2.6.2

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.
Files changed (176) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/article-editor.d.ts +1 -2
  3. package/dist/components/form-wrapped-text-field.d.ts +1 -10
  4. package/dist/components/graph-points-count-selector.d.ts +1 -1
  5. package/dist/es/index.js +364 -364
  6. package/dist/es/index.js.map +1 -1
  7. package/dist/index.js +366 -366
  8. package/dist/index.js.map +1 -1
  9. package/dist/widgets/input-number-editor.d.ts +1 -2
  10. package/dist/widgets/interactive-graph-editor.d.ts +48 -47
  11. package/package.json +12 -12
  12. package/src/__stories__/editor.stories.tsx +3 -1
  13. package/src/__tests__/i18n.test.ts +1 -1
  14. package/src/article-editor.tsx +13 -14
  15. package/src/components/checkbox.tsx +1 -1
  16. package/src/components/dropdown-option.tsx +12 -12
  17. package/src/components/form-wrapped-text-field.tsx +4 -2
  18. package/src/components/graph-points-count-selector.tsx +3 -1
  19. package/src/components/graph-settings.tsx +1 -1
  20. package/src/components/hover-behavior.ts +2 -2
  21. package/src/components/json-editor.tsx +2 -2
  22. package/src/components/sortable.tsx +1 -1
  23. package/src/components/util.ts +1 -1
  24. package/src/components/widget-editor.tsx +7 -7
  25. package/src/diffs/__tests__/structured-item-diff.test.ts +8 -8
  26. package/src/diffs/renderer-diff.tsx +3 -3
  27. package/src/diffs/split-diff.ts +2 -2
  28. package/src/diffs/structured-item-diff.tsx +10 -10
  29. package/src/diffs/text-diff.tsx +1 -1
  30. package/src/diffs/widget-diff.tsx +2 -2
  31. package/src/editor-page.tsx +8 -8
  32. package/src/editor.tsx +36 -36
  33. package/src/hint-editor.tsx +27 -27
  34. package/src/i18n.ts +4 -4
  35. package/src/iframe-content-renderer.tsx +10 -10
  36. package/src/item-editor.tsx +4 -4
  37. package/src/multirenderer-editor.tsx +11 -11
  38. package/src/widgets/categorizer-editor.tsx +3 -3
  39. package/src/widgets/cs-program-editor.tsx +2 -2
  40. package/src/widgets/definition-editor.tsx +2 -2
  41. package/src/widgets/dropdown-editor.tsx +8 -8
  42. package/src/widgets/example-graphie-widget-editor.tsx +1 -1
  43. package/src/widgets/example-graphie-widget.tsx +2 -2
  44. package/src/widgets/example-widget-editor.tsx +2 -2
  45. package/src/widgets/example-widget.tsx +3 -3
  46. package/src/widgets/explanation-editor.tsx +3 -3
  47. package/src/widgets/expression-editor.tsx +9 -9
  48. package/src/widgets/graded-group-editor.tsx +6 -6
  49. package/src/widgets/graded-group-set-editor.tsx +3 -3
  50. package/src/widgets/grapher-editor.tsx +2 -2
  51. package/src/widgets/group-editor.tsx +3 -3
  52. package/src/widgets/iframe-editor.tsx +4 -4
  53. package/src/widgets/input-number-editor.tsx +6 -6
  54. package/src/widgets/interaction-editor.tsx +102 -102
  55. package/src/widgets/interactive-graph-editor.tsx +12 -8
  56. package/src/widgets/label-image/marker.tsx +1 -1
  57. package/src/widgets/label-image/question-markers.tsx +1 -1
  58. package/src/widgets/lights-puzzle-editor.tsx +4 -4
  59. package/src/widgets/matrix-editor.tsx +2 -2
  60. package/src/widgets/measurer-editor.tsx +6 -6
  61. package/src/widgets/molecule-editor.tsx +2 -2
  62. package/src/widgets/number-line-editor.tsx +1 -1
  63. package/src/widgets/numeric-input-editor.tsx +2 -2
  64. package/src/widgets/orderer-editor.tsx +2 -2
  65. package/src/widgets/passage-editor.tsx +3 -3
  66. package/src/widgets/passage-ref-editor.tsx +3 -3
  67. package/src/widgets/passage-ref-target-editor.tsx +1 -1
  68. package/src/widgets/plotter-editor.tsx +4 -4
  69. package/src/widgets/radio/editor.tsx +3 -3
  70. package/src/widgets/reaction-diagram-editor.tsx +5 -5
  71. package/src/widgets/sequence-editor.tsx +1 -1
  72. package/src/widgets/simple-markdown-tester-editor.tsx +3 -3
  73. package/src/widgets/simple-markdown-tester.tsx +2 -2
  74. package/src/widgets/simulator-editor.tsx +1 -1
  75. package/src/widgets/sorter-editor.tsx +1 -1
  76. package/src/widgets/table-editor.tsx +1 -1
  77. package/src/widgets/transformer-editor.tsx +10 -10
  78. package/src/widgets/unit-editor.tsx +5 -5
  79. package/tsconfig-build.tsbuildinfo +1 -1
  80. package/dist/all-editors.js.flow +0 -8
  81. package/dist/all-widgets.js.flow +0 -34
  82. package/dist/article-editor.js.flow +0 -72
  83. package/dist/components/blur-input.js.flow +0 -25
  84. package/dist/components/checkbox.js.flow +0 -26
  85. package/dist/components/device-framer.js.flow +0 -20
  86. package/dist/components/drag-target.js.flow +0 -8
  87. package/dist/components/dropdown-option.js.flow +0 -49
  88. package/dist/components/form-wrapped-text-field.js.flow +0 -45
  89. package/dist/components/graph-points-count-selector.js.flow +0 -12
  90. package/dist/components/graph-settings.js.flow +0 -8
  91. package/dist/components/graph-type-selector.js.flow +0 -12
  92. package/dist/components/hover-behavior.js.flow +0 -48
  93. package/dist/components/json-editor.js.flow +0 -8
  94. package/dist/components/link.js.flow +0 -50
  95. package/dist/components/section-control-button.js.flow +0 -25
  96. package/dist/components/segment-count-selector.js.flow +0 -11
  97. package/dist/components/simple-button.js.flow +0 -18
  98. package/dist/components/sortable.js.flow +0 -8
  99. package/dist/components/util.js.flow +0 -9
  100. package/dist/components/viewport-resizer.js.flow +0 -22
  101. package/dist/components/widget-editor.js.flow +0 -91
  102. package/dist/components/widget-select.js.flow +0 -16
  103. package/dist/diffs/article-diff.js.flow +0 -71
  104. package/dist/diffs/item-diff.js.flow +0 -41
  105. package/dist/diffs/renderer-diff.js.flow +0 -25
  106. package/dist/diffs/split-diff.js.flow +0 -8
  107. package/dist/diffs/string-array-diff.js.flow +0 -11
  108. package/dist/diffs/structured-item-diff.js.flow +0 -37
  109. package/dist/diffs/tags-diff.js.flow +0 -24
  110. package/dist/diffs/text-diff.js.flow +0 -21
  111. package/dist/diffs/widget-diff-performer.js.flow +0 -8
  112. package/dist/diffs/widget-diff.js.flow +0 -31
  113. package/dist/editor-page.js.flow +0 -72
  114. package/dist/editor.js.flow +0 -96
  115. package/dist/hint-editor.js.flow +0 -87
  116. package/dist/i18n.js.flow +0 -13
  117. package/dist/iframe-content-renderer.js.flow +0 -28
  118. package/dist/index.js.flow +0 -23
  119. package/dist/item-editor.js.flow +0 -46
  120. package/dist/item-extras-editor.js.flow +0 -23
  121. package/dist/katex-error-view.js.flow +0 -24
  122. package/dist/multirenderer-editor.js.flow +0 -46
  123. package/dist/stateful-article-editor.js.flow +0 -16
  124. package/dist/stateful-editor-page.js.flow +0 -8
  125. package/dist/testing-widgets.js.flow +0 -34
  126. package/dist/util/points.js.flow +0 -9
  127. package/dist/util/register-all-widgets-and-editors-for-testing.js.flow +0 -7
  128. package/dist/widgets/categorizer-editor.js.flow +0 -62
  129. package/dist/widgets/cs-program-editor.js.flow +0 -25
  130. package/dist/widgets/definition-editor.js.flow +0 -23
  131. package/dist/widgets/dropdown-editor.js.flow +0 -37
  132. package/dist/widgets/example-graphie-widget-editor.js.flow +0 -25
  133. package/dist/widgets/example-graphie-widget.js.flow +0 -102
  134. package/dist/widgets/example-widget-editor.js.flow +0 -26
  135. package/dist/widgets/example-widget.js.flow +0 -86
  136. package/dist/widgets/explanation-editor.js.flow +0 -27
  137. package/dist/widgets/expression-editor.js.flow +0 -43
  138. package/dist/widgets/graded-group-editor.js.flow +0 -68
  139. package/dist/widgets/graded-group-set-editor.js.flow +0 -66
  140. package/dist/widgets/grapher-editor.js.flow +0 -21
  141. package/dist/widgets/group-editor.js.flow +0 -64
  142. package/dist/widgets/iframe-editor.js.flow +0 -24
  143. package/dist/widgets/image-editor.js.flow +0 -8
  144. package/dist/widgets/input-number-editor.js.flow +0 -77
  145. package/dist/widgets/interaction/constraint-editor.js.flow +0 -35
  146. package/dist/widgets/interaction-editor.js.flow +0 -36
  147. package/dist/widgets/interactive-graph-editor.js.flow +0 -5803
  148. package/dist/widgets/label-image/answer-choices.js.flow +0 -16
  149. package/dist/widgets/label-image/behavior.js.flow +0 -17
  150. package/dist/widgets/label-image/marker.js.flow +0 -32
  151. package/dist/widgets/label-image/question-markers.js.flow +0 -23
  152. package/dist/widgets/label-image/select-image.js.flow +0 -13
  153. package/dist/widgets/label-image-editor.js.flow +0 -44
  154. package/dist/widgets/lights-puzzle-editor.js.flow +0 -34
  155. package/dist/widgets/matcher-editor.js.flow +0 -28
  156. package/dist/widgets/matrix-editor.js.flow +0 -26
  157. package/dist/widgets/measurer-editor.js.flow +0 -42
  158. package/dist/widgets/molecule-editor.js.flow +0 -23
  159. package/dist/widgets/number-line-editor.js.flow +0 -45
  160. package/dist/widgets/numeric-input-editor.js.flow +0 -8
  161. package/dist/widgets/orderer-editor.js.flow +0 -30
  162. package/dist/widgets/passage-editor.js.flow +0 -24
  163. package/dist/widgets/passage-ref-editor.js.flow +0 -17
  164. package/dist/widgets/passage-ref-target-editor.js.flow +0 -22
  165. package/dist/widgets/plotter-editor.js.flow +0 -75
  166. package/dist/widgets/radio/editor.js.flow +0 -81
  167. package/dist/widgets/reaction-diagram-editor.js.flow +0 -26
  168. package/dist/widgets/sequence-editor.js.flow +0 -73
  169. package/dist/widgets/simple-markdown-tester-editor.js.flow +0 -23
  170. package/dist/widgets/simple-markdown-tester.js.flow +0 -61
  171. package/dist/widgets/simulator-editor.js.flow +0 -26
  172. package/dist/widgets/sorter-editor.js.flow +0 -22
  173. package/dist/widgets/table-editor.js.flow +0 -24
  174. package/dist/widgets/transformer-editor.js.flow +0 -17
  175. package/dist/widgets/unit-editor.js.flow +0 -41
  176. package/dist/widgets/video-editor.js.flow +0 -25
package/src/editor.tsx CHANGED
@@ -88,7 +88,7 @@ const IMAGE_REGEX = /!\[[^\]]*\]\(([^\s)]+)[^)]*\)/g;
88
88
  * ignores captures. If you don't need captures, use String::match
89
89
  */
90
90
  const allMatches = function (regex: RegExp, str: string) {
91
- // @ts-expect-error [FEI-5003] - TS2702 - 'RegExp' only refers to a type, but is being used as a namespace here.
91
+ // @ts-expect-error - TS2702 - 'RegExp' only refers to a type, but is being used as a namespace here.
92
92
  const result: Array<any | RegExp.matchResult> = [];
93
93
  // eslint-disable-next-line no-constant-condition
94
94
  while (true) {
@@ -184,9 +184,9 @@ class Editor extends React.Component<Props, State> {
184
184
  // setState
185
185
  this._sizeImages(this.props);
186
186
  // eslint-disable-next-line react/no-string-refs
187
- // @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call.
187
+ // @ts-expect-error - TS2769 - No overload matches this call.
188
188
  $(ReactDOM.findDOMNode(this.refs.textarea))
189
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'on' does not exist on type 'JQueryStatic'.
189
+ // @ts-expect-error - TS2339 - Property 'on' does not exist on type 'JQueryStatic'.
190
190
  .on("copy cut", this._maybeCopyWidgets)
191
191
  .on("paste", this._maybePasteWidgets);
192
192
  }
@@ -216,13 +216,13 @@ class Editor extends React.Component<Props, State> {
216
216
  * textarea should be refined with an instanceof check to
217
217
  * HTMLTextAreaElement so that these props are available.
218
218
  */
219
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'Element | Text'.
219
+ // @ts-expect-error - TS2339 - Property 'focus' does not exist on type 'Element | Text'.
220
220
  textarea.focus();
221
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'value' does not exist on type 'Element | Text'.
221
+ // @ts-expect-error - TS2339 - Property 'value' does not exist on type 'Element | Text'.
222
222
  textarea.value = this.lastUserValue;
223
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'selectionStart' does not exist on type 'Element | Text'.
223
+ // @ts-expect-error - TS2339 - Property 'selectionStart' does not exist on type 'Element | Text'.
224
224
  textarea.selectionStart = 0;
225
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'select' does not exist on type 'Element | Text'.
225
+ // @ts-expect-error - TS2339 - Property 'select' does not exist on type 'Element | Text'.
226
226
  textarea.select(0, prevProps.content.length);
227
227
  if (
228
228
  document.execCommand(
@@ -233,7 +233,7 @@ class Editor extends React.Component<Props, State> {
233
233
  ) {
234
234
  // This command is not implemented. Fall back to setting `value`
235
235
  // directly.
236
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'value' does not exist on type 'Element | Text'.
236
+ // @ts-expect-error - TS2339 - Property 'value' does not exist on type 'Element | Text'.
237
237
  textarea.value = this.props.content;
238
238
  }
239
239
  this.lastUserValue = null;
@@ -259,11 +259,11 @@ class Editor extends React.Component<Props, State> {
259
259
  }
260
260
  return (
261
261
  <WidgetEditor
262
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'string' is not assignable to type 'number | undefined'.
262
+ // @ts-expect-error - TS2322 - Type 'string' is not assignable to type 'number | undefined'.
263
263
  key={id}
264
264
  ref={id}
265
265
  id={id}
266
- // @ts-expect-error [FEI-5003] - TS2783 - 'type' is specified more than once, so this usage will be overwritten.
266
+ // @ts-expect-error - TS2783 - 'type' is specified more than once, so this usage will be overwritten.
267
267
  type={type}
268
268
  // eslint-disable-next-line react/jsx-no-bind
269
269
  onChange={this._handleWidgetEditorChange.bind(this, id)}
@@ -295,7 +295,7 @@ class Editor extends React.Component<Props, State> {
295
295
  // eslint-disable-next-line react/no-string-refs
296
296
  const textarea = this.refs.textarea;
297
297
  const re = new RegExp(widgetRegExp.replace("{id}", id), "gm");
298
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'value' does not exist on type 'ReactInstance'.
298
+ // @ts-expect-error - TS2339 - Property 'value' does not exist on type 'ReactInstance'.
299
299
  this.props.onChange({content: textarea.value.replace(re, "")});
300
300
  };
301
301
 
@@ -335,7 +335,7 @@ class Editor extends React.Component<Props, State> {
335
335
  {
336
336
  images: _.clone(images),
337
337
  },
338
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'null' is not assignable to parameter of type '(() => unknown) | undefined'.
338
+ // @ts-expect-error - TS2345 - Argument of type 'null' is not assignable to parameter of type '(() => unknown) | undefined'.
339
339
  null, // callback
340
340
  true, // silent
341
341
  );
@@ -411,13 +411,13 @@ class Editor extends React.Component<Props, State> {
411
411
  this.props.onChange({content: content});
412
412
  })
413
413
  .each((fileAndSentinel) => {
414
- // @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'. | TS2345 - Argument of type 'File' is not assignable to parameter of type 'string'.
414
+ // @ts-expect-error - TS2531 - Object is possibly 'null'. | TS2345 - Argument of type 'File' is not assignable to parameter of type 'string'.
415
415
  imageUploader(fileAndSentinel.file, (url) => {
416
416
  // See componentDidUpdate() for how this flag is used
417
417
  this.lastUserValue = origContent;
418
418
  this.props.onChange({
419
419
  content: this.state.textAreaValue.replace(
420
- // @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
420
+ // @ts-expect-error - TS2531 - Object is possibly 'null'.
421
421
  fileAndSentinel.sentinel,
422
422
  url,
423
423
  ),
@@ -453,7 +453,7 @@ class Editor extends React.Component<Props, State> {
453
453
  const textarea = ReactDOM.findDOMNode(this.refs.textarea);
454
454
 
455
455
  // findDOMNode can also return Text, but we know it's an element.
456
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'Element | Text | null' is not assignable to parameter of type 'HTMLTextAreaElement'.
456
+ // @ts-expect-error - TS2345 - Argument of type 'Element | Text | null' is not assignable to parameter of type 'HTMLTextAreaElement'.
457
457
  const word = Util.textarea.getWordBeforeCursor(textarea);
458
458
  const matches = word.string.toLowerCase().match(shortcutRegexp);
459
459
 
@@ -493,10 +493,10 @@ class Editor extends React.Component<Props, State> {
493
493
  );
494
494
 
495
495
  const widgetNames = _.map(
496
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'RegExpMatchArray | null' is not assignable to parameter of type 'Collection<any>'.
496
+ // @ts-expect-error - TS2345 - Argument of type 'RegExpMatchArray | null' is not assignable to parameter of type 'Collection<any>'.
497
497
  selectedText.match(rWidgetSplit),
498
498
  (syntax) => {
499
- // @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
499
+ // @ts-expect-error - TS2531 - Object is possibly 'null'.
500
500
  return Util.rWidgetParts.exec(syntax)[1];
501
501
  },
502
502
  );
@@ -520,7 +520,7 @@ class Editor extends React.Component<Props, State> {
520
520
  const widgetJSON = localStorage.perseusLastCopiedWidgets;
521
521
  const lastCopiedText = localStorage.perseusLastCopiedText;
522
522
  const textToBePasted =
523
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'originalEvent' does not exist on type 'SyntheticEvent<HTMLTextAreaElement, Event>'.
523
+ // @ts-expect-error - TS2339 - Property 'originalEvent' does not exist on type 'SyntheticEvent<HTMLTextAreaElement, Event>'.
524
524
  e.originalEvent.clipboardData.getData("text");
525
525
 
526
526
  // Only intercept if we have widget data to paste and the user is
@@ -551,9 +551,9 @@ class Editor extends React.Component<Props, State> {
551
551
  rWidgetSplit,
552
552
  (syntax) => {
553
553
  const match = Util.rWidgetParts.exec(syntax);
554
- // @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
554
+ // @ts-expect-error - TS2531 - Object is possibly 'null'.
555
555
  const completeWidget = match[0];
556
- // @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
556
+ // @ts-expect-error - TS2531 - Object is possibly 'null'.
557
557
  const widget = match[1];
558
558
  return completeWidget.replace(
559
559
  widget,
@@ -650,12 +650,12 @@ class Editor extends React.Component<Props, State> {
650
650
  // Note: we have to use _.map here instead of Array::map
651
651
  // because the results of a .match might be null if no
652
652
  // widgets were found.
653
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'RegExpMatchArray | null' is not assignable to parameter of type 'Collection<any>'.
653
+ // @ts-expect-error - TS2345 - Argument of type 'RegExpMatchArray | null' is not assignable to parameter of type 'Collection<any>'.
654
654
  const allWidgetIds = _.map(oldContent.match(rWidgetSplit), (syntax) => {
655
655
  const match = Util.rWidgetParts.exec(syntax);
656
- // @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
656
+ // @ts-expect-error - TS2531 - Object is possibly 'null'.
657
657
  const type = match[2];
658
- // @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
658
+ // @ts-expect-error - TS2531 - Object is possibly 'null'.
659
659
  const num = +match[3];
660
660
  return [type, num];
661
661
  });
@@ -693,12 +693,12 @@ class Editor extends React.Component<Props, State> {
693
693
  const newWidgets = _.clone(this.props.widgets);
694
694
  newWidgets[id] = {
695
695
  options: Widgets.getEditor(widgetType)?.defaultProps,
696
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'string' is not assignable to type '"video" | "image" | "iframe" | "table" | "radio" | "definition" | "group" | "matrix" | "categorizer" | "cs-program" | "dropdown" | "example-graphie-widget" | "example-widget" | ... 26 more ... | "unit-input"'.
696
+ // @ts-expect-error - TS2322 - Type 'string' is not assignable to type '"video" | "image" | "iframe" | "table" | "radio" | "definition" | "group" | "matrix" | "categorizer" | "cs-program" | "dropdown" | "example-graphie-widget" | "example-widget" | ... 26 more ... | "unit-input"'.
697
697
  type: widgetType,
698
698
  // Track widget version on creation, so that a widget editor
699
699
  // without a valid version prop can only possibly refer to a
700
700
  // pre-versioning creation time.
701
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'Version | null | undefined' is not assignable to type 'Version | undefined'.
701
+ // @ts-expect-error - TS2322 - Type 'Version | null | undefined' is not assignable to type 'Version | undefined'.
702
702
  version: Widgets.getVersion(widgetType),
703
703
  };
704
704
 
@@ -712,7 +712,7 @@ class Editor extends React.Component<Props, State> {
712
712
  function () {
713
713
  Util.textarea.moveCursor(
714
714
  // findDOMNode can return Text but we know this is Element
715
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'Element | Text | null' is not assignable to parameter of type 'HTMLTextAreaElement'.
715
+ // @ts-expect-error - TS2345 - Argument of type 'Element | Text | null' is not assignable to parameter of type 'HTMLTextAreaElement'.
716
716
  textarea,
717
717
  // We want to put the cursor after the widget
718
718
  // and after any added newlines
@@ -728,11 +728,11 @@ class Editor extends React.Component<Props, State> {
728
728
 
729
729
  this._addWidgetToContent(
730
730
  this.props.content,
731
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'selectionStart' does not exist on type 'ReactInstance'. | TS2339 - Property 'selectionEnd' does not exist on type 'ReactInstance'.
731
+ // @ts-expect-error - TS2339 - Property 'selectionStart' does not exist on type 'ReactInstance'. | TS2339 - Property 'selectionEnd' does not exist on type 'ReactInstance'.
732
732
  [textarea.selectionStart, textarea.selectionEnd],
733
733
  widgetType,
734
734
  );
735
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
735
+ // @ts-expect-error - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
736
736
  textarea.focus();
737
737
  };
738
738
 
@@ -807,7 +807,7 @@ class Editor extends React.Component<Props, State> {
807
807
  .chain()
808
808
  .map((id) => {
809
809
  // eslint-disable-next-line react/no-string-refs
810
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
810
+ // @ts-expect-error - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
811
811
  const issuesFunc = this.refs[id].getSaveWarnings;
812
812
  const issues = issuesFunc ? issuesFunc() : [];
813
813
  return _.map(issues, (issue) => id + ": " + issue);
@@ -827,7 +827,7 @@ class Editor extends React.Component<Props, State> {
827
827
  * textarea should be refined with an instanceof check to
828
828
  * HTMLTextAreaElement so that these props are available.
829
829
  */
830
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'Element | Text'.
830
+ // @ts-expect-error - TS2339 - Property 'focus' does not exist on type 'Element | Text'.
831
831
  textarea.focus();
832
832
  }
833
833
  };
@@ -842,9 +842,9 @@ class Editor extends React.Component<Props, State> {
842
842
  * textarea should be refined with an instanceof check to
843
843
  * HTMLTextAreaElement so that these props are available.
844
844
  */
845
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'selectionStart' does not exist on type 'Element | Text'. | TS2339 - Property 'value' does not exist on type 'Element | Text'.
845
+ // @ts-expect-error - TS2339 - Property 'selectionStart' does not exist on type 'Element | Text'. | TS2339 - Property 'value' does not exist on type 'Element | Text'.
846
846
  textarea.selectionStart = textarea.value.length;
847
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'selectionEnd' does not exist on type 'Element | Text'. | TS2339 - Property 'value' does not exist on type 'Element | Text'.
847
+ // @ts-expect-error - TS2339 - Property 'selectionEnd' does not exist on type 'Element | Text'. | TS2339 - Property 'value' does not exist on type 'Element | Text'.
848
848
  textarea.selectionEnd = textarea.value.length;
849
849
  }
850
850
  };
@@ -863,7 +863,7 @@ class Editor extends React.Component<Props, State> {
863
863
  const widgetIds = _.intersection(this.widgetIds, _.keys(this.refs));
864
864
  _.each(widgetIds, (id) => {
865
865
  // eslint-disable-next-line react/no-string-refs
866
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
866
+ // @ts-expect-error - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
867
867
  widgets[id] = this.refs[id].serialize();
868
868
  });
869
869
 
@@ -933,7 +933,7 @@ class Editor extends React.Component<Props, State> {
933
933
  // Normal text
934
934
  underlayPieces.push(pieces[i]);
935
935
 
936
- // @ts-expect-error [FEI-5003] - TS2554 - Expected 2 arguments, but got 1.
936
+ // @ts-expect-error - TS2554 - Expected 2 arguments, but got 1.
937
937
  const ast = PerseusMarkdown.parse(pieces[i]);
938
938
 
939
939
  PerseusMarkdown.traverseContent(ast, (node) => {
@@ -946,7 +946,7 @@ class Editor extends React.Component<Props, State> {
946
946
  } catch (e: any) {
947
947
  katexErrorList.push({
948
948
  math: content,
949
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'any' is not assignable to type 'never'.
949
+ // @ts-expect-error - TS2322 - Type 'any' is not assignable to type 'never'.
950
950
  message: e.message,
951
951
  });
952
952
  }
@@ -1002,7 +1002,7 @@ class Editor extends React.Component<Props, State> {
1002
1002
 
1003
1003
  const insertTemplateString = "Insert template\u2026";
1004
1004
  templatesDropDown = (
1005
- // @ts-expect-error [FEI-5003] - TS2322 - Type '(e: SyntheticEvent<HTMLTextAreaElement, Event>) => void' is not assignable to type 'ChangeEventHandler<HTMLSelectElement>'.
1005
+ // @ts-expect-error - TS2322 - Type '(e: SyntheticEvent<HTMLTextAreaElement, Event>) => void' is not assignable to type 'ChangeEventHandler<HTMLSelectElement>'.
1006
1006
  <select onChange={this.addTemplate}>
1007
1007
  <option value="">{insertTemplateString}</option>
1008
1008
  <option disabled>--</option>
@@ -82,19 +82,19 @@ export class HintEditor extends React.Component<HintEditorProps> {
82
82
 
83
83
  focus: () => void = () => {
84
84
  // eslint-disable-next-line react/no-string-refs
85
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
85
+ // @ts-expect-error - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
86
86
  this.refs.editor.focus();
87
87
  };
88
88
 
89
89
  getSaveWarnings: () => any = () => {
90
90
  // eslint-disable-next-line react/no-string-refs
91
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
91
+ // @ts-expect-error - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
92
92
  return this.refs.editor.getSaveWarnings();
93
93
  };
94
94
 
95
95
  serialize: (options?: any) => any = (options: any) => {
96
96
  // eslint-disable-next-line react/no-string-refs
97
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
97
+ // @ts-expect-error - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
98
98
  return this.refs.editor.serialize(options);
99
99
  };
100
100
 
@@ -147,7 +147,7 @@ export class HintEditor extends React.Component<HintEditorProps> {
147
147
  )}
148
148
  <input
149
149
  type="checkbox"
150
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'boolean | null | undefined' is not assignable to type 'boolean | undefined'.
150
+ // @ts-expect-error - TS2322 - Type 'boolean | null | undefined' is not assignable to type 'boolean | undefined'.
151
151
  checked={this.props.replace}
152
152
  onChange={this.handleChange}
153
153
  />
@@ -205,7 +205,7 @@ class CombinedHintEditor extends React.Component<CombinedHintEditorProps> {
205
205
  this.props.isLast && !/\*\*/.test(this.props.hint.content);
206
206
 
207
207
  // eslint-disable-next-line react/no-string-refs
208
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'sendNewData' does not exist on type 'ReactInstance'.
208
+ // @ts-expect-error - TS2339 - Property 'sendNewData' does not exist on type 'ReactInstance'.
209
209
  this.refs.frame.sendNewData({
210
210
  type: "hint",
211
211
  data: {
@@ -224,19 +224,19 @@ class CombinedHintEditor extends React.Component<CombinedHintEditorProps> {
224
224
 
225
225
  getSaveWarnings = () => {
226
226
  // eslint-disable-next-line react/no-string-refs
227
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
227
+ // @ts-expect-error - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
228
228
  return this.refs.editor.getSaveWarnings();
229
229
  };
230
230
 
231
231
  serialize = (options: any) => {
232
232
  // eslint-disable-next-line react/no-string-refs
233
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
233
+ // @ts-expect-error - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
234
234
  return this.refs.editor.serialize(options);
235
235
  };
236
236
 
237
237
  focus = () => {
238
238
  // eslint-disable-next-line react/no-string-refs
239
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
239
+ // @ts-expect-error - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
240
240
  this.refs.editor.focus();
241
241
  };
242
242
 
@@ -341,15 +341,15 @@ class CombinedHintsEditor extends React.Component<CombinedHintsEditorProps> {
341
341
  newProps,
342
342
  );
343
343
 
344
- // @ts-expect-error [FEI-5003] - TS2740 - Type 'Hint' is missing the following properties from type 'readonly Hint[]': length, concat, join, slice, and 18 more.
344
+ // @ts-expect-error - TS2740 - Type 'Hint' is missing the following properties from type 'readonly Hint[]': length, concat, join, slice, and 18 more.
345
345
  this.props.onChange({hints: hints}, cb, silent);
346
346
  };
347
347
 
348
348
  handleHintRemove: (i: number) => void = (i: number) => {
349
349
  const hints = _(this.props.hints).clone();
350
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'splice' does not exist on type 'Hint'.
350
+ // @ts-expect-error - TS2339 - Property 'splice' does not exist on type 'Hint'.
351
351
  hints.splice(i, 1);
352
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'Hint' is not assignable to type 'readonly Hint[]'.
352
+ // @ts-expect-error - TS2322 - Type 'Hint' is not assignable to type 'readonly Hint[]'.
353
353
  this.props.onChange({hints: hints});
354
354
  };
355
355
 
@@ -358,14 +358,14 @@ class CombinedHintsEditor extends React.Component<CombinedHintsEditorProps> {
358
358
  dir: number,
359
359
  ) => {
360
360
  const hints = _(this.props.hints).clone();
361
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'splice' does not exist on type 'Hint'.
361
+ // @ts-expect-error - TS2339 - Property 'splice' does not exist on type 'Hint'.
362
362
  const hint = hints.splice(i, 1)[0];
363
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'splice' does not exist on type 'Hint'.
363
+ // @ts-expect-error - TS2339 - Property 'splice' does not exist on type 'Hint'.
364
364
  hints.splice(i + dir, 0, hint);
365
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'Hint' is not assignable to type 'readonly Hint[]'.
365
+ // @ts-expect-error - TS2322 - Type 'Hint' is not assignable to type 'readonly Hint[]'.
366
366
  this.props.onChange({hints: hints}, () => {
367
367
  // eslint-disable-next-line react/no-string-refs
368
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
368
+ // @ts-expect-error - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
369
369
  this.refs["hintEditor" + (i + dir)].focus();
370
370
  });
371
371
  };
@@ -373,12 +373,12 @@ class CombinedHintsEditor extends React.Component<CombinedHintsEditorProps> {
373
373
  addHint: () => void = () => {
374
374
  const hints = _(this.props.hints)
375
375
  .clone()
376
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'concat' does not exist on type 'Hint'.
376
+ // @ts-expect-error - TS2339 - Property 'concat' does not exist on type 'Hint'.
377
377
  .concat([{content: ""}]);
378
378
  this.props.onChange({hints: hints}, () => {
379
379
  const i = hints.length - 1;
380
380
  // eslint-disable-next-line react/no-string-refs
381
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
381
+ // @ts-expect-error - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.
382
382
  this.refs["hintEditor" + i].focus();
383
383
  });
384
384
  };
@@ -388,7 +388,7 @@ class CombinedHintsEditor extends React.Component<CombinedHintsEditorProps> {
388
388
  .map((hint, i) => {
389
389
  return _.map(
390
390
  // eslint-disable-next-line react/no-string-refs
391
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
391
+ // @ts-expect-error - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
392
392
  this.refs["hintEditor" + i].getSaveWarnings(),
393
393
  (issue) => "Hint " + (i + 1) + ": " + issue,
394
394
  );
@@ -408,7 +408,7 @@ class CombinedHintsEditor extends React.Component<CombinedHintsEditorProps> {
408
408
  options: any,
409
409
  ): string => {
410
410
  // eslint-disable-next-line react/no-string-refs
411
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
411
+ // @ts-expect-error - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
412
412
  return this.refs["hintEditor" + index].serialize(options);
413
413
  };
414
414
 
@@ -426,24 +426,24 @@ class CombinedHintsEditor extends React.Component<CombinedHintsEditorProps> {
426
426
  itemId={itemId}
427
427
  hint={hint}
428
428
  pos={i}
429
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
429
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
430
430
  imageUploader={this.props.imageUploader}
431
431
  // eslint-disable-next-line react/jsx-no-bind
432
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
432
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
433
433
  onChange={this.handleHintChange.bind(this, i)}
434
434
  // eslint-disable-next-line react/jsx-no-bind
435
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
435
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
436
436
  onRemove={this.handleHintRemove.bind(this, i)}
437
437
  // eslint-disable-next-line react/jsx-no-bind
438
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
438
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
439
439
  onMove={this.handleHintMove.bind(this, i)}
440
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
440
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
441
441
  deviceType={this.props.deviceType}
442
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
442
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
443
443
  apiOptions={this.props.apiOptions}
444
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
444
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
445
445
  highlightLint={this.props.highlightLint}
446
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
446
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
447
447
  previewURL={this.props.previewURL}
448
448
  // TODO(CP-4838): what should be passed here?
449
449
  contentPaths={[]}
package/src/i18n.ts CHANGED
@@ -9,7 +9,7 @@ const {findContentNodesInItem, findHintNodesInItem, inferItemShape} =
9
9
 
10
10
  // Takes a renderer content and parses the markdown for images
11
11
  function findImagesInContent(content: any, images: Array<any>) {
12
- // @ts-expect-error [FEI-5003] - TS2554 - Expected 2 arguments, but got 1.
12
+ // @ts-expect-error - TS2554 - Expected 2 arguments, but got 1.
13
13
  const parsed = PerseusMarkdown.parse(content);
14
14
 
15
15
  PerseusMarkdown.traverseContent(parsed, function (node) {
@@ -119,12 +119,12 @@ function findImagesInItemData(itemData: any): any {
119
119
  let renderers = [];
120
120
  if (itemData._multi) {
121
121
  const shape = inferItemShape(itemData);
122
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'ContentNode' is not assignable to parameter of type 'never'.
122
+ // @ts-expect-error - TS2345 - Argument of type 'ContentNode' is not assignable to parameter of type 'never'.
123
123
  findContentNodesInItem(itemData, shape, (node) => renderers.push(node));
124
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'HintNode' is not assignable to parameter of type 'never'.
124
+ // @ts-expect-error - TS2345 - Argument of type 'HintNode' is not assignable to parameter of type 'never'.
125
125
  findHintNodesInItem(itemData, shape, (node) => renderers.push(node));
126
126
  } else {
127
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'any' is not assignable to type 'never'. | TS2322 - Type 'any' is not assignable to type 'never'.
127
+ // @ts-expect-error - TS2322 - Type 'any' is not assignable to type 'never'. | TS2322 - Type 'any' is not assignable to type 'never'.
128
128
  renderers = [itemData.question, ...itemData.hints];
129
129
  }
130
130
  return findImagesInRenderers(renderers);
@@ -17,7 +17,7 @@ import * as React from "react";
17
17
  let nextIframeID = 0;
18
18
  const requestIframeData: Record<string, any> = {};
19
19
  const updateIframeHeight: Record<string, any> = {};
20
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'iframeDataStore' does not exist on type 'Window & typeof globalThis'.
20
+ // @ts-expect-error - TS2339 - Property 'iframeDataStore' does not exist on type 'Window & typeof globalThis'.
21
21
  window.iframeDataStore = {};
22
22
 
23
23
  // This is called once after Perseus is loaded and the iframe
@@ -66,12 +66,12 @@ type Props = {
66
66
 
67
67
  class IframeContentRenderer extends React.Component<Props> {
68
68
  _frame: HTMLIFrameElement | null | undefined;
69
- // @ts-expect-error [FEI-5003] - TS2564 - Property '_isMounted' has no initializer and is not definitely assigned in the constructor.
69
+ // @ts-expect-error - TS2564 - Property '_isMounted' has no initializer and is not definitely assigned in the constructor.
70
70
  _isMounted: boolean;
71
71
  _lastData: any;
72
- // @ts-expect-error [FEI-5003] - TS2564 - Property '_lastHeight' has no initializer and is not definitely assigned in the constructor.
72
+ // @ts-expect-error - TS2564 - Property '_lastHeight' has no initializer and is not definitely assigned in the constructor.
73
73
  _lastHeight: number;
74
- // @ts-expect-error [FEI-5003] - TS2564 - Property 'iframeID' has no initializer and is not definitely assigned in the constructor.
74
+ // @ts-expect-error - TS2564 - Property 'iframeID' has no initializer and is not definitely assigned in the constructor.
75
75
  iframeID: number;
76
76
 
77
77
  componentDidMount() {
@@ -91,7 +91,7 @@ class IframeContentRenderer extends React.Component<Props> {
91
91
  this._lastHeight = height;
92
92
  if (this._isMounted && this.props.seamless) {
93
93
  // eslint-disable-next-line react/no-string-refs
94
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'style' does not exist on type 'ReactInstance'.
94
+ // @ts-expect-error - TS2339 - Property 'style' does not exist on type 'ReactInstance'.
95
95
  this.refs.container.style.height = height + "px";
96
96
  }
97
97
  };
@@ -107,11 +107,11 @@ class IframeContentRenderer extends React.Component<Props> {
107
107
  componentDidUpdate(prevProps: Props) {
108
108
  if (!this.props.seamless) {
109
109
  // eslint-disable-next-line react/no-string-refs
110
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'style' does not exist on type 'ReactInstance'.
110
+ // @ts-expect-error - TS2339 - Property 'style' does not exist on type 'ReactInstance'.
111
111
  this.refs.container.style.height = "100%";
112
112
  } else {
113
113
  // eslint-disable-next-line react/no-string-refs
114
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'style' does not exist on type 'ReactInstance'.
114
+ // @ts-expect-error - TS2339 - Property 'style' does not exist on type 'ReactInstance'.
115
115
  this.refs.container.style.height = this._lastHeight + "px";
116
116
  }
117
117
 
@@ -132,7 +132,7 @@ class IframeContentRenderer extends React.Component<Props> {
132
132
  // Don't initialize the iframe until the page has loaded
133
133
  if (this._frame) {
134
134
  // eslint-disable-next-line react/no-string-refs
135
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'removeChild' does not exist on type 'ReactInstance'.
135
+ // @ts-expect-error - TS2339 - Property 'removeChild' does not exist on type 'ReactInstance'.
136
136
  this.refs.container.removeChild(this._frame);
137
137
  }
138
138
 
@@ -160,7 +160,7 @@ class IframeContentRenderer extends React.Component<Props> {
160
160
  }
161
161
 
162
162
  // eslint-disable-next-line react/no-string-refs
163
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'appendChild' does not exist on type 'ReactInstance'.
163
+ // @ts-expect-error - TS2339 - Property 'appendChild' does not exist on type 'ReactInstance'.
164
164
  this.refs.container.appendChild(frame);
165
165
 
166
166
  this._frame = frame;
@@ -174,7 +174,7 @@ class IframeContentRenderer extends React.Component<Props> {
174
174
  // We can't use JSON.stringify/parse for this because the apiOptions
175
175
  // includes the functions GroupMetadataEditor, groupAnnotator,
176
176
  // onFocusChange, and onInputError.
177
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'iframeDataStore' does not exist on type 'Window & typeof globalThis'.
177
+ // @ts-expect-error - TS2339 - Property 'iframeDataStore' does not exist on type 'Window & typeof globalThis'.
178
178
  window.iframeDataStore[this.iframeID] = data;
179
179
  frame.contentWindow.postMessage(this.iframeID, "*");
180
180
  }
@@ -51,7 +51,7 @@ class ItemEditor extends React.Component<Props> {
51
51
 
52
52
  triggerPreviewUpdate: (newData?: any) => void = (newData: any) => {
53
53
  // eslint-disable-next-line react/no-string-refs
54
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'sendNewData' does not exist on type 'ReactInstance'.
54
+ // @ts-expect-error - TS2339 - Property 'sendNewData' does not exist on type 'ReactInstance'.
55
55
  this.refs.frame.sendNewData(newData);
56
56
  };
57
57
 
@@ -67,7 +67,7 @@ class ItemEditor extends React.Component<Props> {
67
67
 
68
68
  getSaveWarnings: () => any = () => {
69
69
  // eslint-disable-next-line react/no-string-refs
70
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
70
+ // @ts-expect-error - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
71
71
  return this.refs.questionEditor.getSaveWarnings();
72
72
  };
73
73
 
@@ -81,10 +81,10 @@ class ItemEditor extends React.Component<Props> {
81
81
  } = (options: any) => {
82
82
  return {
83
83
  // eslint-disable-next-line react/no-string-refs
84
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
84
+ // @ts-expect-error - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
85
85
  question: this.refs.questionEditor.serialize(options),
86
86
  // eslint-disable-next-line react/no-string-refs
87
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
87
+ // @ts-expect-error - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
88
88
  answerArea: this.refs.itemExtrasEditor.serialize(options),
89
89
  itemDataVersion: ITEM_DATA_VERSION,
90
90
  };