@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.
- package/CHANGELOG.md +13 -0
- package/dist/article-editor.d.ts +1 -2
- package/dist/components/form-wrapped-text-field.d.ts +1 -10
- package/dist/components/graph-points-count-selector.d.ts +1 -1
- package/dist/es/index.js +364 -364
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +366 -366
- package/dist/index.js.map +1 -1
- package/dist/widgets/input-number-editor.d.ts +1 -2
- package/dist/widgets/interactive-graph-editor.d.ts +48 -47
- package/package.json +12 -12
- package/src/__stories__/editor.stories.tsx +3 -1
- package/src/__tests__/i18n.test.ts +1 -1
- package/src/article-editor.tsx +13 -14
- package/src/components/checkbox.tsx +1 -1
- package/src/components/dropdown-option.tsx +12 -12
- package/src/components/form-wrapped-text-field.tsx +4 -2
- package/src/components/graph-points-count-selector.tsx +3 -1
- package/src/components/graph-settings.tsx +1 -1
- package/src/components/hover-behavior.ts +2 -2
- package/src/components/json-editor.tsx +2 -2
- package/src/components/sortable.tsx +1 -1
- package/src/components/util.ts +1 -1
- package/src/components/widget-editor.tsx +7 -7
- package/src/diffs/__tests__/structured-item-diff.test.ts +8 -8
- package/src/diffs/renderer-diff.tsx +3 -3
- package/src/diffs/split-diff.ts +2 -2
- package/src/diffs/structured-item-diff.tsx +10 -10
- package/src/diffs/text-diff.tsx +1 -1
- package/src/diffs/widget-diff.tsx +2 -2
- package/src/editor-page.tsx +8 -8
- package/src/editor.tsx +36 -36
- package/src/hint-editor.tsx +27 -27
- package/src/i18n.ts +4 -4
- package/src/iframe-content-renderer.tsx +10 -10
- package/src/item-editor.tsx +4 -4
- package/src/multirenderer-editor.tsx +11 -11
- package/src/widgets/categorizer-editor.tsx +3 -3
- package/src/widgets/cs-program-editor.tsx +2 -2
- package/src/widgets/definition-editor.tsx +2 -2
- package/src/widgets/dropdown-editor.tsx +8 -8
- package/src/widgets/example-graphie-widget-editor.tsx +1 -1
- package/src/widgets/example-graphie-widget.tsx +2 -2
- package/src/widgets/example-widget-editor.tsx +2 -2
- package/src/widgets/example-widget.tsx +3 -3
- package/src/widgets/explanation-editor.tsx +3 -3
- package/src/widgets/expression-editor.tsx +9 -9
- package/src/widgets/graded-group-editor.tsx +6 -6
- package/src/widgets/graded-group-set-editor.tsx +3 -3
- package/src/widgets/grapher-editor.tsx +2 -2
- package/src/widgets/group-editor.tsx +3 -3
- package/src/widgets/iframe-editor.tsx +4 -4
- package/src/widgets/input-number-editor.tsx +6 -6
- package/src/widgets/interaction-editor.tsx +102 -102
- package/src/widgets/interactive-graph-editor.tsx +12 -8
- package/src/widgets/label-image/marker.tsx +1 -1
- package/src/widgets/label-image/question-markers.tsx +1 -1
- package/src/widgets/lights-puzzle-editor.tsx +4 -4
- package/src/widgets/matrix-editor.tsx +2 -2
- package/src/widgets/measurer-editor.tsx +6 -6
- package/src/widgets/molecule-editor.tsx +2 -2
- package/src/widgets/number-line-editor.tsx +1 -1
- package/src/widgets/numeric-input-editor.tsx +2 -2
- package/src/widgets/orderer-editor.tsx +2 -2
- package/src/widgets/passage-editor.tsx +3 -3
- package/src/widgets/passage-ref-editor.tsx +3 -3
- package/src/widgets/passage-ref-target-editor.tsx +1 -1
- package/src/widgets/plotter-editor.tsx +4 -4
- package/src/widgets/radio/editor.tsx +3 -3
- package/src/widgets/reaction-diagram-editor.tsx +5 -5
- package/src/widgets/sequence-editor.tsx +1 -1
- package/src/widgets/simple-markdown-tester-editor.tsx +3 -3
- package/src/widgets/simple-markdown-tester.tsx +2 -2
- package/src/widgets/simulator-editor.tsx +1 -1
- package/src/widgets/sorter-editor.tsx +1 -1
- package/src/widgets/table-editor.tsx +1 -1
- package/src/widgets/transformer-editor.tsx +10 -10
- package/src/widgets/unit-editor.tsx +5 -5
- package/tsconfig-build.tsbuildinfo +1 -1
- package/dist/all-editors.js.flow +0 -8
- package/dist/all-widgets.js.flow +0 -34
- package/dist/article-editor.js.flow +0 -72
- package/dist/components/blur-input.js.flow +0 -25
- package/dist/components/checkbox.js.flow +0 -26
- package/dist/components/device-framer.js.flow +0 -20
- package/dist/components/drag-target.js.flow +0 -8
- package/dist/components/dropdown-option.js.flow +0 -49
- package/dist/components/form-wrapped-text-field.js.flow +0 -45
- package/dist/components/graph-points-count-selector.js.flow +0 -12
- package/dist/components/graph-settings.js.flow +0 -8
- package/dist/components/graph-type-selector.js.flow +0 -12
- package/dist/components/hover-behavior.js.flow +0 -48
- package/dist/components/json-editor.js.flow +0 -8
- package/dist/components/link.js.flow +0 -50
- package/dist/components/section-control-button.js.flow +0 -25
- package/dist/components/segment-count-selector.js.flow +0 -11
- package/dist/components/simple-button.js.flow +0 -18
- package/dist/components/sortable.js.flow +0 -8
- package/dist/components/util.js.flow +0 -9
- package/dist/components/viewport-resizer.js.flow +0 -22
- package/dist/components/widget-editor.js.flow +0 -91
- package/dist/components/widget-select.js.flow +0 -16
- package/dist/diffs/article-diff.js.flow +0 -71
- package/dist/diffs/item-diff.js.flow +0 -41
- package/dist/diffs/renderer-diff.js.flow +0 -25
- package/dist/diffs/split-diff.js.flow +0 -8
- package/dist/diffs/string-array-diff.js.flow +0 -11
- package/dist/diffs/structured-item-diff.js.flow +0 -37
- package/dist/diffs/tags-diff.js.flow +0 -24
- package/dist/diffs/text-diff.js.flow +0 -21
- package/dist/diffs/widget-diff-performer.js.flow +0 -8
- package/dist/diffs/widget-diff.js.flow +0 -31
- package/dist/editor-page.js.flow +0 -72
- package/dist/editor.js.flow +0 -96
- package/dist/hint-editor.js.flow +0 -87
- package/dist/i18n.js.flow +0 -13
- package/dist/iframe-content-renderer.js.flow +0 -28
- package/dist/index.js.flow +0 -23
- package/dist/item-editor.js.flow +0 -46
- package/dist/item-extras-editor.js.flow +0 -23
- package/dist/katex-error-view.js.flow +0 -24
- package/dist/multirenderer-editor.js.flow +0 -46
- package/dist/stateful-article-editor.js.flow +0 -16
- package/dist/stateful-editor-page.js.flow +0 -8
- package/dist/testing-widgets.js.flow +0 -34
- package/dist/util/points.js.flow +0 -9
- package/dist/util/register-all-widgets-and-editors-for-testing.js.flow +0 -7
- package/dist/widgets/categorizer-editor.js.flow +0 -62
- package/dist/widgets/cs-program-editor.js.flow +0 -25
- package/dist/widgets/definition-editor.js.flow +0 -23
- package/dist/widgets/dropdown-editor.js.flow +0 -37
- package/dist/widgets/example-graphie-widget-editor.js.flow +0 -25
- package/dist/widgets/example-graphie-widget.js.flow +0 -102
- package/dist/widgets/example-widget-editor.js.flow +0 -26
- package/dist/widgets/example-widget.js.flow +0 -86
- package/dist/widgets/explanation-editor.js.flow +0 -27
- package/dist/widgets/expression-editor.js.flow +0 -43
- package/dist/widgets/graded-group-editor.js.flow +0 -68
- package/dist/widgets/graded-group-set-editor.js.flow +0 -66
- package/dist/widgets/grapher-editor.js.flow +0 -21
- package/dist/widgets/group-editor.js.flow +0 -64
- package/dist/widgets/iframe-editor.js.flow +0 -24
- package/dist/widgets/image-editor.js.flow +0 -8
- package/dist/widgets/input-number-editor.js.flow +0 -77
- package/dist/widgets/interaction/constraint-editor.js.flow +0 -35
- package/dist/widgets/interaction-editor.js.flow +0 -36
- package/dist/widgets/interactive-graph-editor.js.flow +0 -5803
- package/dist/widgets/label-image/answer-choices.js.flow +0 -16
- package/dist/widgets/label-image/behavior.js.flow +0 -17
- package/dist/widgets/label-image/marker.js.flow +0 -32
- package/dist/widgets/label-image/question-markers.js.flow +0 -23
- package/dist/widgets/label-image/select-image.js.flow +0 -13
- package/dist/widgets/label-image-editor.js.flow +0 -44
- package/dist/widgets/lights-puzzle-editor.js.flow +0 -34
- package/dist/widgets/matcher-editor.js.flow +0 -28
- package/dist/widgets/matrix-editor.js.flow +0 -26
- package/dist/widgets/measurer-editor.js.flow +0 -42
- package/dist/widgets/molecule-editor.js.flow +0 -23
- package/dist/widgets/number-line-editor.js.flow +0 -45
- package/dist/widgets/numeric-input-editor.js.flow +0 -8
- package/dist/widgets/orderer-editor.js.flow +0 -30
- package/dist/widgets/passage-editor.js.flow +0 -24
- package/dist/widgets/passage-ref-editor.js.flow +0 -17
- package/dist/widgets/passage-ref-target-editor.js.flow +0 -22
- package/dist/widgets/plotter-editor.js.flow +0 -75
- package/dist/widgets/radio/editor.js.flow +0 -81
- package/dist/widgets/reaction-diagram-editor.js.flow +0 -26
- package/dist/widgets/sequence-editor.js.flow +0 -73
- package/dist/widgets/simple-markdown-tester-editor.js.flow +0 -23
- package/dist/widgets/simple-markdown-tester.js.flow +0 -61
- package/dist/widgets/simulator-editor.js.flow +0 -26
- package/dist/widgets/sorter-editor.js.flow +0 -22
- package/dist/widgets/table-editor.js.flow +0 -24
- package/dist/widgets/transformer-editor.js.flow +0 -17
- package/dist/widgets/unit-editor.js.flow +0 -41
- package/dist/widgets/video-editor.js.flow +0 -25
|
@@ -71,7 +71,7 @@ class PointEditor extends React.Component<PointEditorProps> {
|
|
|
71
71
|
buttonSets={[]}
|
|
72
72
|
buttonsVisible="never"
|
|
73
73
|
value={this.props.coordX}
|
|
74
|
-
// @ts-expect-error
|
|
74
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
75
75
|
onChange={this.change("coordX")}
|
|
76
76
|
/>
|
|
77
77
|
<TeX>,</TeX>{" "}
|
|
@@ -79,7 +79,7 @@ class PointEditor extends React.Component<PointEditorProps> {
|
|
|
79
79
|
buttonSets={[]}
|
|
80
80
|
buttonsVisible="never"
|
|
81
81
|
value={this.props.coordY}
|
|
82
|
-
// @ts-expect-error
|
|
82
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
83
83
|
onChange={this.change("coordY")}
|
|
84
84
|
/>
|
|
85
85
|
<TeX>\Large)</TeX>
|
|
@@ -87,7 +87,7 @@ class PointEditor extends React.Component<PointEditorProps> {
|
|
|
87
87
|
<div className="perseus-widget-row">
|
|
88
88
|
<ColorPicker
|
|
89
89
|
value={this.props.color}
|
|
90
|
-
// @ts-expect-error
|
|
90
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
91
91
|
onChange={this.change("color")}
|
|
92
92
|
/>
|
|
93
93
|
</div>
|
|
@@ -146,7 +146,7 @@ class LineEditor extends React.Component<LineEditorProps> {
|
|
|
146
146
|
buttonSets={[]}
|
|
147
147
|
buttonsVisible="never"
|
|
148
148
|
value={this.props.startX}
|
|
149
|
-
// @ts-expect-error
|
|
149
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
150
150
|
onChange={this.change("startX")}
|
|
151
151
|
/>
|
|
152
152
|
<TeX>,</TeX>{" "}
|
|
@@ -154,7 +154,7 @@ class LineEditor extends React.Component<LineEditorProps> {
|
|
|
154
154
|
buttonSets={[]}
|
|
155
155
|
buttonsVisible="never"
|
|
156
156
|
value={this.props.startY}
|
|
157
|
-
// @ts-expect-error
|
|
157
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
158
158
|
onChange={this.change("startY")}
|
|
159
159
|
/>
|
|
160
160
|
<TeX>\Large)</TeX>
|
|
@@ -165,7 +165,7 @@ class LineEditor extends React.Component<LineEditorProps> {
|
|
|
165
165
|
buttonSets={[]}
|
|
166
166
|
buttonsVisible="never"
|
|
167
167
|
value={this.props.endX}
|
|
168
|
-
// @ts-expect-error
|
|
168
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
169
169
|
onChange={this.change("endX")}
|
|
170
170
|
/>
|
|
171
171
|
<TeX>,</TeX>{" "}
|
|
@@ -173,7 +173,7 @@ class LineEditor extends React.Component<LineEditorProps> {
|
|
|
173
173
|
buttonSets={[]}
|
|
174
174
|
buttonsVisible="never"
|
|
175
175
|
value={this.props.endY}
|
|
176
|
-
// @ts-expect-error
|
|
176
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
177
177
|
onChange={this.change("endY")}
|
|
178
178
|
/>
|
|
179
179
|
<TeX>\Large)</TeX>
|
|
@@ -181,20 +181,20 @@ class LineEditor extends React.Component<LineEditorProps> {
|
|
|
181
181
|
<div className="perseus-widget-row">
|
|
182
182
|
<ColorPicker
|
|
183
183
|
value={this.props.color}
|
|
184
|
-
// @ts-expect-error
|
|
184
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
185
185
|
onChange={this.change("color")}
|
|
186
186
|
/>
|
|
187
187
|
</div>
|
|
188
188
|
<div className="perseus-widget-row">
|
|
189
189
|
<DashPicker
|
|
190
190
|
value={this.props.strokeDasharray}
|
|
191
|
-
// @ts-expect-error
|
|
191
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
192
192
|
onChange={this.change("strokeDasharray")}
|
|
193
193
|
/>
|
|
194
194
|
|
|
195
195
|
<ArrowPicker
|
|
196
196
|
value={this.props.arrows}
|
|
197
|
-
// @ts-expect-error
|
|
197
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
198
198
|
onChange={this.change("arrows")}
|
|
199
199
|
/>
|
|
200
200
|
</div>
|
|
@@ -204,7 +204,7 @@ class LineEditor extends React.Component<LineEditorProps> {
|
|
|
204
204
|
<NumberInput
|
|
205
205
|
value={this.props.strokeWidth}
|
|
206
206
|
placeholder={2}
|
|
207
|
-
// @ts-expect-error
|
|
207
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
208
208
|
onChange={this.change("strokeWidth")}
|
|
209
209
|
/>
|
|
210
210
|
</div>
|
|
@@ -282,7 +282,7 @@ class MovablePointEditor extends React.Component<MovablePointEditorProps> {
|
|
|
282
282
|
onChange={this.change("varSubscript")}
|
|
283
283
|
/>
|
|
284
284
|
</div>
|
|
285
|
-
{/* @ts-expect-error
|
|
285
|
+
{/* @ts-expect-error - TS2769 - No overload matches this call. */}
|
|
286
286
|
<ConstraintEditor {...this.props} />
|
|
287
287
|
</div>
|
|
288
288
|
);
|
|
@@ -390,7 +390,7 @@ class MovableLineEditor extends React.Component<MovableLineEditorProps> {
|
|
|
390
390
|
<div className="perseus-widget-row">
|
|
391
391
|
All constraints are applied to the start point.
|
|
392
392
|
</div>
|
|
393
|
-
{/* @ts-expect-error
|
|
393
|
+
{/* @ts-expect-error - TS2769 - No overload matches this call. */}
|
|
394
394
|
<ConstraintEditor {...this.props} />
|
|
395
395
|
</div>
|
|
396
396
|
);
|
|
@@ -443,7 +443,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
|
|
|
443
443
|
buttonSets={[]}
|
|
444
444
|
buttonsVisible="never"
|
|
445
445
|
value={this.props.value}
|
|
446
|
-
// @ts-expect-error
|
|
446
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
447
447
|
onChange={this.change("value")}
|
|
448
448
|
/>
|
|
449
449
|
</div>
|
|
@@ -453,7 +453,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
|
|
|
453
453
|
buttonSets={[]}
|
|
454
454
|
buttonsVisible="never"
|
|
455
455
|
value={this.props.rangeMin}
|
|
456
|
-
// @ts-expect-error
|
|
456
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
457
457
|
onChange={this.change("rangeMin")}
|
|
458
458
|
/>
|
|
459
459
|
<TeX>,</TeX>{" "}
|
|
@@ -461,7 +461,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
|
|
|
461
461
|
buttonSets={[]}
|
|
462
462
|
buttonsVisible="never"
|
|
463
463
|
value={this.props.rangeMax}
|
|
464
|
-
// @ts-expect-error
|
|
464
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
465
465
|
onChange={this.change("rangeMax")}
|
|
466
466
|
/>
|
|
467
467
|
<TeX>\Large)</TeX>
|
|
@@ -469,14 +469,14 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
|
|
|
469
469
|
<div className="perseus-widget-row">
|
|
470
470
|
<ColorPicker
|
|
471
471
|
value={this.props.color}
|
|
472
|
-
// @ts-expect-error
|
|
472
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
473
473
|
onChange={this.change("color")}
|
|
474
474
|
/>
|
|
475
475
|
</div>
|
|
476
476
|
<div className="perseus-widget-row">
|
|
477
477
|
<DashPicker
|
|
478
478
|
value={this.props.strokeDasharray}
|
|
479
|
-
// @ts-expect-error
|
|
479
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
480
480
|
onChange={this.change("strokeDasharray")}
|
|
481
481
|
/>
|
|
482
482
|
</div>
|
|
@@ -486,7 +486,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
|
|
|
486
486
|
<NumberInput
|
|
487
487
|
value={this.props.strokeWidth}
|
|
488
488
|
placeholder={2}
|
|
489
|
-
// @ts-expect-error
|
|
489
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
490
490
|
onChange={this.change("strokeWidth")}
|
|
491
491
|
/>
|
|
492
492
|
</div>
|
|
@@ -544,7 +544,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
|
|
|
544
544
|
buttonSets={[]}
|
|
545
545
|
buttonsVisible="never"
|
|
546
546
|
value={this.props.x}
|
|
547
|
-
// @ts-expect-error
|
|
547
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
548
548
|
onChange={this.change("x")}
|
|
549
549
|
/>
|
|
550
550
|
</div>
|
|
@@ -554,7 +554,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
|
|
|
554
554
|
buttonSets={[]}
|
|
555
555
|
buttonsVisible="never"
|
|
556
556
|
value={this.props.y}
|
|
557
|
-
// @ts-expect-error
|
|
557
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
558
558
|
onChange={this.change("y")}
|
|
559
559
|
/>
|
|
560
560
|
</div>
|
|
@@ -564,7 +564,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
|
|
|
564
564
|
buttonSets={[]}
|
|
565
565
|
buttonsVisible="never"
|
|
566
566
|
value={this.props.rangeMin}
|
|
567
|
-
// @ts-expect-error
|
|
567
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
568
568
|
onChange={this.change("rangeMin")}
|
|
569
569
|
/>
|
|
570
570
|
<TeX>,</TeX>{" "}
|
|
@@ -572,7 +572,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
|
|
|
572
572
|
buttonSets={[]}
|
|
573
573
|
buttonsVisible="never"
|
|
574
574
|
value={this.props.rangeMax}
|
|
575
|
-
// @ts-expect-error
|
|
575
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
576
576
|
onChange={this.change("rangeMax")}
|
|
577
577
|
/>
|
|
578
578
|
<TeX>\Large)</TeX>
|
|
@@ -580,14 +580,14 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
|
|
|
580
580
|
<div className="perseus-widget-row">
|
|
581
581
|
<ColorPicker
|
|
582
582
|
value={this.props.color}
|
|
583
|
-
// @ts-expect-error
|
|
583
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
584
584
|
onChange={this.change("color")}
|
|
585
585
|
/>
|
|
586
586
|
</div>
|
|
587
587
|
<div className="perseus-widget-row">
|
|
588
588
|
<DashPicker
|
|
589
589
|
value={this.props.strokeDasharray}
|
|
590
|
-
// @ts-expect-error
|
|
590
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
591
591
|
onChange={this.change("strokeDasharray")}
|
|
592
592
|
/>
|
|
593
593
|
</div>
|
|
@@ -597,7 +597,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
|
|
|
597
597
|
<NumberInput
|
|
598
598
|
value={this.props.strokeWidth}
|
|
599
599
|
placeholder={2}
|
|
600
|
-
// @ts-expect-error
|
|
600
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
601
601
|
onChange={this.change("strokeWidth")}
|
|
602
602
|
/>
|
|
603
603
|
</div>
|
|
@@ -647,7 +647,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
|
|
|
647
647
|
<div className="perseus-widget-row">
|
|
648
648
|
<TextInput
|
|
649
649
|
value={this.props.label}
|
|
650
|
-
// @ts-expect-error
|
|
650
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
651
651
|
onChange={this.change("label")}
|
|
652
652
|
style={{
|
|
653
653
|
width: "100%",
|
|
@@ -660,7 +660,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
|
|
|
660
660
|
buttonSets={[]}
|
|
661
661
|
buttonsVisible="never"
|
|
662
662
|
value={this.props.coordX}
|
|
663
|
-
// @ts-expect-error
|
|
663
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
664
664
|
onChange={this.change("coordX")}
|
|
665
665
|
/>
|
|
666
666
|
<TeX>,</TeX>{" "}
|
|
@@ -668,7 +668,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
|
|
|
668
668
|
buttonSets={[]}
|
|
669
669
|
buttonsVisible="never"
|
|
670
670
|
value={this.props.coordY}
|
|
671
|
-
// @ts-expect-error
|
|
671
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
672
672
|
onChange={this.change("coordY")}
|
|
673
673
|
/>
|
|
674
674
|
<TeX>\Large)</TeX>
|
|
@@ -676,7 +676,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
|
|
|
676
676
|
<div className="perseus-widget-row">
|
|
677
677
|
<ColorPicker
|
|
678
678
|
value={this.props.color}
|
|
679
|
-
// @ts-expect-error
|
|
679
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
680
680
|
onChange={this.change("color")}
|
|
681
681
|
/>
|
|
682
682
|
</div>
|
|
@@ -729,7 +729,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
|
|
|
729
729
|
buttonSets={[]}
|
|
730
730
|
buttonsVisible="never"
|
|
731
731
|
value={this.props.coordX}
|
|
732
|
-
// @ts-expect-error
|
|
732
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
733
733
|
onChange={this.change("coordX")}
|
|
734
734
|
/>
|
|
735
735
|
<TeX>,</TeX>{" "}
|
|
@@ -737,7 +737,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
|
|
|
737
737
|
buttonSets={[]}
|
|
738
738
|
buttonsVisible="never"
|
|
739
739
|
value={this.props.coordY}
|
|
740
|
-
// @ts-expect-error
|
|
740
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
741
741
|
onChange={this.change("coordY")}
|
|
742
742
|
/>
|
|
743
743
|
<TeX>\Large)</TeX>
|
|
@@ -748,7 +748,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
|
|
|
748
748
|
buttonSets={[]}
|
|
749
749
|
buttonsVisible="never"
|
|
750
750
|
value={this.props.width}
|
|
751
|
-
// @ts-expect-error
|
|
751
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
752
752
|
onChange={this.change("width")}
|
|
753
753
|
/>
|
|
754
754
|
</div>
|
|
@@ -758,7 +758,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
|
|
|
758
758
|
buttonSets={[]}
|
|
759
759
|
buttonsVisible="never"
|
|
760
760
|
value={this.props.height}
|
|
761
|
-
// @ts-expect-error
|
|
761
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
762
762
|
onChange={this.change("height")}
|
|
763
763
|
/>
|
|
764
764
|
</div>
|
|
@@ -766,7 +766,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
|
|
|
766
766
|
<ColorPicker
|
|
767
767
|
value={this.props.color}
|
|
768
768
|
lightColors={true}
|
|
769
|
-
// @ts-expect-error
|
|
769
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
770
770
|
onChange={this.change("color")}
|
|
771
771
|
/>
|
|
772
772
|
</div>
|
|
@@ -845,7 +845,7 @@ class InteractionEditor extends React.Component<
|
|
|
845
845
|
_updateGraphProps: (arg1: any) => any = (newProps) => {
|
|
846
846
|
// TODO(eater): GraphSettings should name this tickStep instead
|
|
847
847
|
// of step. Grr..
|
|
848
|
-
// @ts-expect-error
|
|
848
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
849
849
|
this.change({
|
|
850
850
|
graph: _.extend(_.omit(newProps, "step"), {
|
|
851
851
|
tickStep: newProps.step,
|
|
@@ -891,14 +891,14 @@ class InteractionEditor extends React.Component<
|
|
|
891
891
|
if (elementType === "movable-point") {
|
|
892
892
|
nextSubscript =
|
|
893
893
|
_.max([_.max(this.state.usedVarSubscripts), -1]) + 1;
|
|
894
|
-
// @ts-expect-error
|
|
894
|
+
// @ts-expect-error - TS2339 - Property 'varSubscript' does not exist on type '{}'.
|
|
895
895
|
newElement.options.varSubscript = nextSubscript;
|
|
896
896
|
} else if (elementType === "movable-line") {
|
|
897
897
|
nextSubscript =
|
|
898
898
|
_.max([_.max(this.state.usedVarSubscripts), -1]) + 1;
|
|
899
|
-
// @ts-expect-error
|
|
899
|
+
// @ts-expect-error - TS2339 - Property 'startSubscript' does not exist on type '{}'.
|
|
900
900
|
newElement.options.startSubscript = nextSubscript;
|
|
901
|
-
// @ts-expect-error
|
|
901
|
+
// @ts-expect-error - TS2339 - Property 'endSubscript' does not exist on type '{}'.
|
|
902
902
|
newElement.options.endSubscript = nextSubscript + 1;
|
|
903
903
|
} else if (elementType === "function") {
|
|
904
904
|
// TODO(eater): The 22nd function added will be {(x) since '{'
|
|
@@ -913,10 +913,10 @@ class InteractionEditor extends React.Component<
|
|
|
913
913
|
"e".charCodeAt(0),
|
|
914
914
|
]) + 1,
|
|
915
915
|
);
|
|
916
|
-
// @ts-expect-error
|
|
916
|
+
// @ts-expect-error - TS2339 - Property 'funcName' does not exist on type '{}'.
|
|
917
917
|
newElement.options.funcName = nextLetter;
|
|
918
918
|
}
|
|
919
|
-
// @ts-expect-error
|
|
919
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
920
920
|
this.change({
|
|
921
921
|
elements: this.props.elements.concat(newElement),
|
|
922
922
|
});
|
|
@@ -924,7 +924,7 @@ class InteractionEditor extends React.Component<
|
|
|
924
924
|
|
|
925
925
|
_deleteElement: (arg1: number) => void = (index) => {
|
|
926
926
|
const element = this.props.elements[index];
|
|
927
|
-
// @ts-expect-error
|
|
927
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
928
928
|
this.change({elements: _.without(this.props.elements, element)});
|
|
929
929
|
};
|
|
930
930
|
|
|
@@ -932,7 +932,7 @@ class InteractionEditor extends React.Component<
|
|
|
932
932
|
const element = this.props.elements[index];
|
|
933
933
|
const newElements = _.without(this.props.elements, element);
|
|
934
934
|
newElements.splice(index - 1, 0, element);
|
|
935
|
-
// @ts-expect-error
|
|
935
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
936
936
|
this.change({elements: newElements});
|
|
937
937
|
};
|
|
938
938
|
|
|
@@ -940,7 +940,7 @@ class InteractionEditor extends React.Component<
|
|
|
940
940
|
const element = this.props.elements[index];
|
|
941
941
|
const newElements = _.without(this.props.elements, element);
|
|
942
942
|
newElements.splice(index + 1, 0, element);
|
|
943
|
-
// @ts-expect-error
|
|
943
|
+
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
944
944
|
this.change({elements: newElements});
|
|
945
945
|
};
|
|
946
946
|
|
|
@@ -953,7 +953,7 @@ class InteractionEditor extends React.Component<
|
|
|
953
953
|
|
|
954
954
|
return (
|
|
955
955
|
<div className="perseus-widget-interaction-editor">
|
|
956
|
-
{/* @ts-expect-error
|
|
956
|
+
{/* @ts-expect-error - TS2322 - Type '{ children: (false | Element)[]; title: string; }' is not assignable to type 'Pick<Readonly<ElementContainerProps> & Readonly<{ children?: ReactNode; }>, "children" | "onDelete" | "onDown" | "onUp">'. */}
|
|
957
957
|
<ElementContainer title="Grid settings">
|
|
958
958
|
<GraphSettings
|
|
959
959
|
editableSettings={["canvas", "graph"]}
|
|
@@ -993,23 +993,23 @@ class InteractionEditor extends React.Component<
|
|
|
993
993
|
onUp={
|
|
994
994
|
n === 0
|
|
995
995
|
? null
|
|
996
|
-
: // @ts-expect-error
|
|
996
|
+
: // @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.
|
|
997
997
|
this._moveElementUp.bind(this, n)
|
|
998
998
|
}
|
|
999
999
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1000
1000
|
onDown={
|
|
1001
|
-
// @ts-expect-error
|
|
1001
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1002
1002
|
n === this.props.elements.length - 1
|
|
1003
1003
|
? null
|
|
1004
|
-
: // @ts-expect-error
|
|
1004
|
+
: // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1005
1005
|
this._moveElementDown.bind(
|
|
1006
|
-
// @ts-expect-error
|
|
1006
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1007
1007
|
this,
|
|
1008
1008
|
n,
|
|
1009
1009
|
)
|
|
1010
1010
|
}
|
|
1011
1011
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1012
|
-
// @ts-expect-error
|
|
1012
|
+
// @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.
|
|
1013
1013
|
onDelete={this._deleteElement.bind(this, n)}
|
|
1014
1014
|
key={element.key}
|
|
1015
1015
|
>
|
|
@@ -1018,7 +1018,7 @@ class InteractionEditor extends React.Component<
|
|
|
1018
1018
|
onChange={(newProps) => {
|
|
1019
1019
|
const elements = JSON.parse(
|
|
1020
1020
|
JSON.stringify(
|
|
1021
|
-
// @ts-expect-error
|
|
1021
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1022
1022
|
this.props.elements,
|
|
1023
1023
|
),
|
|
1024
1024
|
);
|
|
@@ -1026,7 +1026,7 @@ class InteractionEditor extends React.Component<
|
|
|
1026
1026
|
elements[n].options,
|
|
1027
1027
|
newProps,
|
|
1028
1028
|
);
|
|
1029
|
-
// @ts-expect-error
|
|
1029
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1030
1030
|
this.change({elements: elements});
|
|
1031
1031
|
}}
|
|
1032
1032
|
/>
|
|
@@ -1064,23 +1064,23 @@ class InteractionEditor extends React.Component<
|
|
|
1064
1064
|
onUp={
|
|
1065
1065
|
n === 0
|
|
1066
1066
|
? null
|
|
1067
|
-
: // @ts-expect-error
|
|
1067
|
+
: // @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.
|
|
1068
1068
|
this._moveElementUp.bind(this, n)
|
|
1069
1069
|
}
|
|
1070
1070
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1071
1071
|
onDown={
|
|
1072
|
-
// @ts-expect-error
|
|
1072
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1073
1073
|
n === this.props.elements.length - 1
|
|
1074
1074
|
? null
|
|
1075
|
-
: // @ts-expect-error
|
|
1075
|
+
: // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1076
1076
|
this._moveElementDown.bind(
|
|
1077
|
-
// @ts-expect-error
|
|
1077
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1078
1078
|
this,
|
|
1079
1079
|
n,
|
|
1080
1080
|
)
|
|
1081
1081
|
}
|
|
1082
1082
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1083
|
-
// @ts-expect-error
|
|
1083
|
+
// @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.
|
|
1084
1084
|
onDelete={this._deleteElement.bind(this, n)}
|
|
1085
1085
|
key={element.key}
|
|
1086
1086
|
>
|
|
@@ -1089,7 +1089,7 @@ class InteractionEditor extends React.Component<
|
|
|
1089
1089
|
onChange={(newProps) => {
|
|
1090
1090
|
const elements = JSON.parse(
|
|
1091
1091
|
JSON.stringify(
|
|
1092
|
-
// @ts-expect-error
|
|
1092
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1093
1093
|
this.props.elements,
|
|
1094
1094
|
),
|
|
1095
1095
|
);
|
|
@@ -1097,7 +1097,7 @@ class InteractionEditor extends React.Component<
|
|
|
1097
1097
|
elements[n].options,
|
|
1098
1098
|
newProps,
|
|
1099
1099
|
);
|
|
1100
|
-
// @ts-expect-error
|
|
1100
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1101
1101
|
this.change({elements: elements});
|
|
1102
1102
|
}}
|
|
1103
1103
|
/>
|
|
@@ -1123,23 +1123,23 @@ class InteractionEditor extends React.Component<
|
|
|
1123
1123
|
onUp={
|
|
1124
1124
|
n === 0
|
|
1125
1125
|
? null
|
|
1126
|
-
: // @ts-expect-error
|
|
1126
|
+
: // @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.
|
|
1127
1127
|
this._moveElementUp.bind(this, n)
|
|
1128
1128
|
}
|
|
1129
1129
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1130
1130
|
onDown={
|
|
1131
|
-
// @ts-expect-error
|
|
1131
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1132
1132
|
n === this.props.elements.length - 1
|
|
1133
1133
|
? null
|
|
1134
|
-
: // @ts-expect-error
|
|
1134
|
+
: // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1135
1135
|
this._moveElementDown.bind(
|
|
1136
|
-
// @ts-expect-error
|
|
1136
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1137
1137
|
this,
|
|
1138
1138
|
n,
|
|
1139
1139
|
)
|
|
1140
1140
|
}
|
|
1141
1141
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1142
|
-
// @ts-expect-error
|
|
1142
|
+
// @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.
|
|
1143
1143
|
onDelete={this._deleteElement.bind(this, n)}
|
|
1144
1144
|
key={element.key}
|
|
1145
1145
|
>
|
|
@@ -1148,7 +1148,7 @@ class InteractionEditor extends React.Component<
|
|
|
1148
1148
|
onChange={(newProps) => {
|
|
1149
1149
|
const elements = JSON.parse(
|
|
1150
1150
|
JSON.stringify(
|
|
1151
|
-
// @ts-expect-error
|
|
1151
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1152
1152
|
this.props.elements,
|
|
1153
1153
|
),
|
|
1154
1154
|
);
|
|
@@ -1156,7 +1156,7 @@ class InteractionEditor extends React.Component<
|
|
|
1156
1156
|
elements[n].options,
|
|
1157
1157
|
newProps,
|
|
1158
1158
|
);
|
|
1159
|
-
// @ts-expect-error
|
|
1159
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1160
1160
|
this.change({elements: elements});
|
|
1161
1161
|
}}
|
|
1162
1162
|
/>
|
|
@@ -1190,23 +1190,23 @@ class InteractionEditor extends React.Component<
|
|
|
1190
1190
|
onUp={
|
|
1191
1191
|
n === 0
|
|
1192
1192
|
? null
|
|
1193
|
-
: // @ts-expect-error
|
|
1193
|
+
: // @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.
|
|
1194
1194
|
this._moveElementUp.bind(this, n)
|
|
1195
1195
|
}
|
|
1196
1196
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1197
1197
|
onDown={
|
|
1198
|
-
// @ts-expect-error
|
|
1198
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1199
1199
|
n === this.props.elements.length - 1
|
|
1200
1200
|
? null
|
|
1201
|
-
: // @ts-expect-error
|
|
1201
|
+
: // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1202
1202
|
this._moveElementDown.bind(
|
|
1203
|
-
// @ts-expect-error
|
|
1203
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1204
1204
|
this,
|
|
1205
1205
|
n,
|
|
1206
1206
|
)
|
|
1207
1207
|
}
|
|
1208
1208
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1209
|
-
// @ts-expect-error
|
|
1209
|
+
// @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.
|
|
1210
1210
|
onDelete={this._deleteElement.bind(this, n)}
|
|
1211
1211
|
key={element.key}
|
|
1212
1212
|
>
|
|
@@ -1215,7 +1215,7 @@ class InteractionEditor extends React.Component<
|
|
|
1215
1215
|
onChange={(newProps) => {
|
|
1216
1216
|
const elements = JSON.parse(
|
|
1217
1217
|
JSON.stringify(
|
|
1218
|
-
// @ts-expect-error
|
|
1218
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1219
1219
|
this.props.elements,
|
|
1220
1220
|
),
|
|
1221
1221
|
);
|
|
@@ -1223,7 +1223,7 @@ class InteractionEditor extends React.Component<
|
|
|
1223
1223
|
elements[n].options,
|
|
1224
1224
|
newProps,
|
|
1225
1225
|
);
|
|
1226
|
-
// @ts-expect-error
|
|
1226
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1227
1227
|
this.change({elements: elements});
|
|
1228
1228
|
}}
|
|
1229
1229
|
/>
|
|
@@ -1247,22 +1247,22 @@ class InteractionEditor extends React.Component<
|
|
|
1247
1247
|
onUp={
|
|
1248
1248
|
n === 0
|
|
1249
1249
|
? null
|
|
1250
|
-
: // @ts-expect-error
|
|
1250
|
+
: // @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.
|
|
1251
1251
|
this._moveElementUp.bind(this, n)
|
|
1252
1252
|
}
|
|
1253
1253
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1254
1254
|
onDown={
|
|
1255
|
-
// @ts-expect-error
|
|
1255
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1256
1256
|
n === this.props.elements.length - 1
|
|
1257
1257
|
? null
|
|
1258
|
-
: // @ts-expect-error
|
|
1258
|
+
: // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1259
1259
|
this._moveElementDown.bind(
|
|
1260
|
-
// @ts-expect-error
|
|
1260
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1261
1261
|
this,
|
|
1262
1262
|
n,
|
|
1263
1263
|
)
|
|
1264
1264
|
}
|
|
1265
|
-
// @ts-expect-error
|
|
1265
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1266
1266
|
onDelete={this._deleteElement}
|
|
1267
1267
|
key={element.key}
|
|
1268
1268
|
>
|
|
@@ -1271,7 +1271,7 @@ class InteractionEditor extends React.Component<
|
|
|
1271
1271
|
onChange={(newProps) => {
|
|
1272
1272
|
const elements = JSON.parse(
|
|
1273
1273
|
JSON.stringify(
|
|
1274
|
-
// @ts-expect-error
|
|
1274
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1275
1275
|
this.props.elements,
|
|
1276
1276
|
),
|
|
1277
1277
|
);
|
|
@@ -1279,7 +1279,7 @@ class InteractionEditor extends React.Component<
|
|
|
1279
1279
|
elements[n].options,
|
|
1280
1280
|
newProps,
|
|
1281
1281
|
);
|
|
1282
|
-
// @ts-expect-error
|
|
1282
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1283
1283
|
this.change({elements: elements});
|
|
1284
1284
|
}}
|
|
1285
1285
|
/>
|
|
@@ -1294,22 +1294,22 @@ class InteractionEditor extends React.Component<
|
|
|
1294
1294
|
onUp={
|
|
1295
1295
|
n === 0
|
|
1296
1296
|
? null
|
|
1297
|
-
: // @ts-expect-error
|
|
1297
|
+
: // @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.
|
|
1298
1298
|
this._moveElementUp.bind(this, n)
|
|
1299
1299
|
}
|
|
1300
1300
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1301
1301
|
onDown={
|
|
1302
|
-
// @ts-expect-error
|
|
1302
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1303
1303
|
n === this.props.elements.length - 1
|
|
1304
1304
|
? null
|
|
1305
|
-
: // @ts-expect-error
|
|
1305
|
+
: // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1306
1306
|
this._moveElementDown.bind(
|
|
1307
|
-
// @ts-expect-error
|
|
1307
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1308
1308
|
this,
|
|
1309
1309
|
n,
|
|
1310
1310
|
)
|
|
1311
1311
|
}
|
|
1312
|
-
// @ts-expect-error
|
|
1312
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1313
1313
|
onDelete={this._deleteElement}
|
|
1314
1314
|
key={element.key}
|
|
1315
1315
|
>
|
|
@@ -1318,7 +1318,7 @@ class InteractionEditor extends React.Component<
|
|
|
1318
1318
|
onChange={(newProps) => {
|
|
1319
1319
|
const elements = JSON.parse(
|
|
1320
1320
|
JSON.stringify(
|
|
1321
|
-
// @ts-expect-error
|
|
1321
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1322
1322
|
this.props.elements,
|
|
1323
1323
|
),
|
|
1324
1324
|
);
|
|
@@ -1326,7 +1326,7 @@ class InteractionEditor extends React.Component<
|
|
|
1326
1326
|
elements[n].options,
|
|
1327
1327
|
newProps,
|
|
1328
1328
|
);
|
|
1329
|
-
// @ts-expect-error
|
|
1329
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1330
1330
|
this.change({elements: elements});
|
|
1331
1331
|
}}
|
|
1332
1332
|
/>
|
|
@@ -1350,22 +1350,22 @@ class InteractionEditor extends React.Component<
|
|
|
1350
1350
|
onUp={
|
|
1351
1351
|
n === 0
|
|
1352
1352
|
? null
|
|
1353
|
-
: // @ts-expect-error
|
|
1353
|
+
: // @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.
|
|
1354
1354
|
this._moveElementUp.bind(this, n)
|
|
1355
1355
|
}
|
|
1356
1356
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1357
1357
|
onDown={
|
|
1358
|
-
// @ts-expect-error
|
|
1358
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1359
1359
|
n === this.props.elements.length - 1
|
|
1360
1360
|
? null
|
|
1361
|
-
: // @ts-expect-error
|
|
1361
|
+
: // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1362
1362
|
this._moveElementDown.bind(
|
|
1363
|
-
// @ts-expect-error
|
|
1363
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1364
1364
|
this,
|
|
1365
1365
|
n,
|
|
1366
1366
|
)
|
|
1367
1367
|
}
|
|
1368
|
-
// @ts-expect-error
|
|
1368
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1369
1369
|
onDelete={this._deleteElement}
|
|
1370
1370
|
key={element.key}
|
|
1371
1371
|
>
|
|
@@ -1374,7 +1374,7 @@ class InteractionEditor extends React.Component<
|
|
|
1374
1374
|
onChange={(newProps) => {
|
|
1375
1375
|
const elements = JSON.parse(
|
|
1376
1376
|
JSON.stringify(
|
|
1377
|
-
// @ts-expect-error
|
|
1377
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1378
1378
|
this.props.elements,
|
|
1379
1379
|
),
|
|
1380
1380
|
);
|
|
@@ -1382,7 +1382,7 @@ class InteractionEditor extends React.Component<
|
|
|
1382
1382
|
elements[n].options,
|
|
1383
1383
|
newProps,
|
|
1384
1384
|
);
|
|
1385
|
-
// @ts-expect-error
|
|
1385
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1386
1386
|
this.change({elements: elements});
|
|
1387
1387
|
}}
|
|
1388
1388
|
/>
|
|
@@ -1414,22 +1414,22 @@ class InteractionEditor extends React.Component<
|
|
|
1414
1414
|
onUp={
|
|
1415
1415
|
n === 0
|
|
1416
1416
|
? null
|
|
1417
|
-
: // @ts-expect-error
|
|
1417
|
+
: // @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.
|
|
1418
1418
|
this._moveElementUp.bind(this, n)
|
|
1419
1419
|
}
|
|
1420
1420
|
// eslint-disable-next-line react/jsx-no-bind
|
|
1421
1421
|
onDown={
|
|
1422
|
-
// @ts-expect-error
|
|
1422
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1423
1423
|
n === this.props.elements.length - 1
|
|
1424
1424
|
? null
|
|
1425
|
-
: // @ts-expect-error
|
|
1425
|
+
: // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1426
1426
|
this._moveElementDown.bind(
|
|
1427
|
-
// @ts-expect-error
|
|
1427
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1428
1428
|
this,
|
|
1429
1429
|
n,
|
|
1430
1430
|
)
|
|
1431
1431
|
}
|
|
1432
|
-
// @ts-expect-error
|
|
1432
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1433
1433
|
onDelete={this._deleteElement}
|
|
1434
1434
|
key={element.key}
|
|
1435
1435
|
>
|
|
@@ -1438,7 +1438,7 @@ class InteractionEditor extends React.Component<
|
|
|
1438
1438
|
onChange={(newProps) => {
|
|
1439
1439
|
const elements = JSON.parse(
|
|
1440
1440
|
JSON.stringify(
|
|
1441
|
-
// @ts-expect-error
|
|
1441
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1442
1442
|
this.props.elements,
|
|
1443
1443
|
),
|
|
1444
1444
|
);
|
|
@@ -1446,7 +1446,7 @@ class InteractionEditor extends React.Component<
|
|
|
1446
1446
|
elements[n].options,
|
|
1447
1447
|
newProps,
|
|
1448
1448
|
);
|
|
1449
|
-
// @ts-expect-error
|
|
1449
|
+
// @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1450
1450
|
this.change({elements: elements});
|
|
1451
1451
|
}}
|
|
1452
1452
|
/>
|
|
@@ -1457,7 +1457,7 @@ class InteractionEditor extends React.Component<
|
|
|
1457
1457
|
this,
|
|
1458
1458
|
)}
|
|
1459
1459
|
<div className="perseus-widget-interaction-editor-select-element">
|
|
1460
|
-
{/* @ts-expect-error
|
|
1460
|
+
{/* @ts-expect-error - TS2322 - Type '(arg1: ChangeEvent<HTMLInputElement>) => void' is not assignable to type 'ChangeEventHandler<HTMLSelectElement>'. */}
|
|
1461
1461
|
<select onChange={this._addNewElement}>
|
|
1462
1462
|
<option value="">Add an element{"\u2026"}</option>
|
|
1463
1463
|
<option disabled>--</option>
|