@khanacademy/perseus-editor 1.1.0 → 2.0.0
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/.babelrc.js +1 -1
- package/.eslintrc.js +1 -0
- package/CHANGELOG.md +21 -0
- package/dist/all-editors.d.ts +2 -0
- package/dist/all-editors.js.flow +8 -0
- package/dist/all-widgets.d.ts +22 -0
- package/dist/all-widgets.js.flow +34 -0
- package/dist/article-editor.d.ts +59 -0
- package/dist/article-editor.js.flow +72 -0
- package/dist/components/blur-input.d.ts +19 -0
- package/dist/components/blur-input.js.flow +25 -0
- package/dist/components/checkbox.d.ts +20 -0
- package/dist/components/checkbox.js.flow +26 -0
- package/dist/components/device-framer.d.ts +15 -0
- package/dist/components/device-framer.js.flow +20 -0
- package/dist/components/drag-target.d.ts +2 -0
- package/dist/components/drag-target.js.flow +8 -0
- package/dist/components/dropdown-option.d.ts +35 -0
- package/dist/components/dropdown-option.js.flow +49 -0
- package/dist/components/form-wrapped-text-field.d.ts +48 -0
- package/dist/components/form-wrapped-text-field.js.flow +48 -0
- package/dist/components/graph-settings.d.ts +2 -0
- package/dist/components/graph-settings.js.flow +8 -0
- package/dist/components/hover-behavior.d.ts +85 -0
- package/dist/components/hover-behavior.js.flow +48 -0
- package/dist/components/json-editor.d.ts +2 -0
- package/dist/components/json-editor.js.flow +8 -0
- package/dist/components/link.d.ts +41 -0
- package/dist/components/link.js.flow +50 -0
- package/dist/components/simple-button.d.ts +16 -0
- package/dist/components/simple-button.js.flow +18 -0
- package/dist/components/sortable.d.ts +2 -0
- package/dist/components/sortable.js.flow +8 -0
- package/dist/components/util.d.ts +1 -0
- package/dist/components/util.js.flow +9 -0
- package/dist/components/viewport-resizer.d.ts +16 -0
- package/dist/components/viewport-resizer.js.flow +22 -0
- package/dist/diffs/__stories__/perseus-diff-wrapper.d.ts +5 -0
- package/dist/diffs/__stories__/perseus-diff-wrapper.js.flow +11 -0
- package/dist/diffs/article-diff.d.ts +50 -0
- package/dist/diffs/article-diff.js.flow +71 -0
- package/dist/diffs/item-diff.d.ts +23 -0
- package/dist/diffs/item-diff.js.flow +41 -0
- package/dist/diffs/renderer-diff.d.ts +22 -0
- package/dist/diffs/renderer-diff.js.flow +25 -0
- package/dist/diffs/split-diff.d.ts +2 -0
- package/dist/diffs/split-diff.js.flow +8 -0
- package/dist/diffs/string-array-diff.d.ts +2 -0
- package/dist/diffs/string-array-diff.js.flow +11 -0
- package/dist/diffs/structured-item-diff.d.ts +25 -0
- package/dist/diffs/structured-item-diff.js.flow +37 -0
- package/dist/diffs/tags-diff.d.ts +21 -0
- package/dist/diffs/tags-diff.js.flow +24 -0
- package/dist/diffs/text-diff.d.ts +15 -0
- package/dist/diffs/text-diff.js.flow +21 -0
- package/dist/diffs/widget-diff-performer.d.ts +2 -0
- package/dist/diffs/widget-diff-performer.js.flow +8 -0
- package/dist/diffs/widget-diff.d.ts +21 -0
- package/dist/diffs/widget-diff.js.flow +31 -0
- package/dist/editor-page.d.ts +57 -0
- package/dist/editor-page.js.flow +73 -0
- package/dist/editor.d.ts +82 -0
- package/dist/editor.js.flow +98 -0
- package/dist/es/index.js +1428 -2587
- package/dist/es/index.js.map +1 -1
- package/dist/hint-editor.d.ts +64 -0
- package/dist/hint-editor.js.flow +87 -0
- package/dist/i18n.d.ts +7 -0
- package/dist/i18n.js.flow +13 -0
- package/dist/iframe-content-renderer.d.ts +22 -0
- package/dist/iframe-content-renderer.js.flow +28 -0
- package/dist/index.d.ts +17 -2
- package/dist/index.js +1492 -2548
- package/dist/index.js.flow +23 -2
- package/dist/index.js.map +1 -1
- package/dist/item-editor.d.ts +36 -0
- package/dist/item-editor.js.flow +46 -0
- package/dist/item-extras-editor.d.ts +17 -0
- package/dist/item-extras-editor.js.flow +23 -0
- package/dist/katex-error-view.d.ts +16 -0
- package/dist/katex-error-view.js.flow +24 -0
- package/dist/multirenderer-editor.d.ts +32 -0
- package/dist/multirenderer-editor.js.flow +46 -0
- package/dist/section-control-button.d.ts +12 -0
- package/dist/section-control-button.js.flow +20 -0
- package/dist/stateful-article-editor.d.ts +10 -0
- package/dist/stateful-article-editor.js.flow +16 -0
- package/dist/stateful-editor-page.d.ts +2 -0
- package/dist/stateful-editor-page.js.flow +8 -0
- package/dist/testing-widgets.d.ts +22 -0
- package/dist/testing-widgets.js.flow +34 -0
- package/dist/util/register-all-widgets-and-editors-for-testing.d.ts +1 -0
- package/dist/util/register-all-widgets-and-editors-for-testing.js.flow +7 -0
- package/dist/widgets/categorizer-editor.d.ts +47 -0
- package/dist/widgets/categorizer-editor.js.flow +61 -0
- package/dist/widgets/cs-program-editor.d.ts +21 -0
- package/dist/widgets/cs-program-editor.js.flow +25 -0
- package/dist/widgets/definition-editor.d.ts +17 -0
- package/dist/widgets/definition-editor.js.flow +23 -0
- package/dist/widgets/dropdown-editor.d.ts +23 -0
- package/dist/widgets/dropdown-editor.js.flow +37 -0
- package/dist/widgets/example-graphie-widget-editor.d.ts +18 -0
- package/dist/widgets/example-graphie-widget-editor.js.flow +25 -0
- package/dist/widgets/example-graphie-widget.d.ts +87 -0
- package/dist/widgets/example-graphie-widget.js.flow +101 -0
- package/dist/widgets/example-widget-editor.d.ts +19 -0
- package/dist/widgets/example-widget-editor.js.flow +26 -0
- package/dist/widgets/example-widget.d.ts +71 -0
- package/dist/widgets/example-widget.js.flow +86 -0
- package/dist/widgets/explanation-editor.d.ts +21 -0
- package/dist/widgets/explanation-editor.js.flow +27 -0
- package/dist/widgets/expression-editor.d.ts +33 -0
- package/dist/widgets/expression-editor.js.flow +41 -0
- package/dist/widgets/graded-group-editor.d.ts +53 -0
- package/dist/widgets/graded-group-editor.js.flow +67 -0
- package/dist/widgets/graded-group-set-editor.d.ts +51 -0
- package/dist/widgets/graded-group-set-editor.js.flow +65 -0
- package/dist/widgets/grapher-editor.d.ts +14 -0
- package/dist/widgets/grapher-editor.js.flow +21 -0
- package/dist/widgets/group-editor.d.ts +49 -0
- package/dist/widgets/group-editor.js.flow +63 -0
- package/dist/widgets/iframe-editor.d.ts +18 -0
- package/dist/widgets/iframe-editor.js.flow +24 -0
- package/dist/widgets/image-editor.d.ts +2 -0
- package/dist/widgets/image-editor.js.flow +8 -0
- package/dist/widgets/input-number-editor.d.ts +47 -0
- package/dist/widgets/input-number-editor.js.flow +77 -0
- package/dist/widgets/interaction/constraint-editor.d.ts +26 -0
- package/dist/widgets/interaction/constraint-editor.js.flow +35 -0
- package/dist/widgets/interaction-editor.d.ts +28 -0
- package/dist/widgets/interaction-editor.js.flow +36 -0
- package/dist/widgets/interactive-graph-editor.d.ts +2 -0
- package/dist/widgets/interactive-graph-editor.js.flow +8 -0
- package/dist/widgets/label-image/answer-choices.d.ts +13 -0
- package/dist/widgets/label-image/answer-choices.js.flow +16 -0
- package/dist/widgets/label-image/behavior.d.ts +14 -0
- package/dist/widgets/label-image/behavior.js.flow +17 -0
- package/dist/widgets/label-image/marker.d.ts +30 -0
- package/dist/widgets/label-image/marker.js.flow +34 -0
- package/dist/widgets/label-image/question-markers.d.ts +22 -0
- package/dist/widgets/label-image/question-markers.js.flow +25 -0
- package/dist/widgets/label-image/select-image.d.ts +10 -0
- package/dist/widgets/label-image/select-image.js.flow +13 -0
- package/dist/widgets/label-image-editor.d.ts +45 -0
- package/dist/widgets/label-image-editor.js.flow +44 -0
- package/dist/widgets/lights-puzzle-editor.d.ts +24 -0
- package/dist/widgets/lights-puzzle-editor.js.flow +34 -0
- package/dist/widgets/matcher-editor.d.ts +19 -0
- package/dist/widgets/matcher-editor.js.flow +28 -0
- package/dist/widgets/matrix-editor.d.ts +20 -0
- package/dist/widgets/matrix-editor.js.flow +26 -0
- package/dist/widgets/measurer-editor.d.ts +32 -0
- package/dist/widgets/measurer-editor.js.flow +42 -0
- package/dist/widgets/molecule-editor.d.ts +17 -0
- package/dist/widgets/molecule-editor.js.flow +23 -0
- package/dist/widgets/number-line-editor.d.ts +36 -0
- package/dist/widgets/number-line-editor.js.flow +45 -0
- package/dist/widgets/numeric-input-editor.d.ts +2 -0
- package/dist/widgets/numeric-input-editor.js.flow +8 -0
- package/dist/widgets/orderer-editor.d.ts +20 -0
- package/dist/widgets/orderer-editor.js.flow +30 -0
- package/dist/widgets/passage-editor.d.ts +18 -0
- package/dist/widgets/passage-editor.js.flow +24 -0
- package/dist/widgets/passage-ref-editor.d.ts +11 -0
- package/dist/widgets/passage-ref-editor.js.flow +17 -0
- package/dist/widgets/passage-ref-target-editor.d.ts +16 -0
- package/dist/widgets/passage-ref-target-editor.js.flow +22 -0
- package/dist/widgets/plotter-editor.d.ts +45 -0
- package/dist/widgets/plotter-editor.js.flow +53 -0
- package/dist/widgets/radio/editor.d.ts +64 -0
- package/dist/widgets/radio/editor.js.flow +80 -0
- package/dist/widgets/reaction-diagram-editor.d.ts +20 -0
- package/dist/widgets/reaction-diagram-editor.js.flow +26 -0
- package/dist/widgets/sequence-editor.d.ts +56 -0
- package/dist/widgets/sequence-editor.js.flow +72 -0
- package/dist/widgets/simple-markdown-tester-editor.d.ts +14 -0
- package/dist/widgets/simple-markdown-tester-editor.js.flow +23 -0
- package/dist/widgets/simple-markdown-tester.d.ts +52 -0
- package/dist/widgets/simple-markdown-tester.js.flow +61 -0
- package/dist/widgets/simulator-editor.d.ts +20 -0
- package/dist/widgets/simulator-editor.js.flow +26 -0
- package/dist/widgets/sorter-editor.d.ts +16 -0
- package/dist/widgets/sorter-editor.js.flow +22 -0
- package/dist/widgets/table-editor.d.ts +18 -0
- package/dist/widgets/table-editor.js.flow +24 -0
- package/dist/widgets/transformer-editor.d.ts +11 -0
- package/dist/widgets/transformer-editor.js.flow +17 -0
- package/dist/widgets/unit-editor.d.ts +33 -0
- package/dist/widgets/unit-editor.js.flow +41 -0
- package/dist/widgets/video-editor.d.ts +19 -0
- package/dist/widgets/video-editor.js.flow +25 -0
- package/package.json +6 -5
- package/src/__stories__/{editor.stories.js → editor.stories.tsx} +4 -5
- package/src/__stories__/{section-control-button.stories.jsx → section-control-button.stories.tsx} +10 -11
- package/src/__testdata__/{input-number_testdata.js → input-number.testdata.ts} +2 -3
- package/src/__tests__/{editor_test.jsx → editor.test.tsx} +4 -7
- package/src/__tests__/{i18n_test.jsx → i18n.test.ts} +5 -5
- package/src/__tests__/{traversal_test.jsx → traversal.test.ts} +9 -10
- package/src/{all-editors_test.js → all-editors.test.ts} +1 -2
- package/src/all-editors.ts +83 -0
- package/src/all-widgets.ts +7 -0
- package/src/{article-editor.jsx → article-editor.tsx} +52 -42
- package/src/components/__stories__/{blur-input.stories.jsx → blur-input.stories.tsx} +2 -4
- package/src/components/{blur-input.jsx → blur-input.tsx} +12 -13
- package/src/components/{checkbox.jsx → checkbox.tsx} +18 -19
- package/src/components/{device-framer.jsx → device-framer.tsx} +4 -5
- package/src/components/{drag-target.jsx → drag-target.tsx} +0 -1
- package/src/components/{dropdown-option.jsx → dropdown-option.tsx} +40 -40
- package/src/components/{form-wrapped-text-field.jsx → form-wrapped-text-field.tsx} +47 -53
- package/src/components/{graph-settings.jsx → graph-settings.tsx} +4 -8
- package/src/components/{hover-behavior.jsx → hover-behavior.ts} +32 -33
- package/src/components/{json-editor.jsx → json-editor.tsx} +4 -3
- package/src/components/{link.jsx → link.ts} +33 -33
- package/src/components/{simple-button.jsx → simple-button.tsx} +3 -4
- package/src/components/{sortable.jsx → sortable.tsx} +3 -3
- package/src/components/{util.js → util.ts} +1 -2
- package/src/components/{viewport-resizer.jsx → viewport-resizer.tsx} +5 -6
- package/src/diffs/__stories__/{perseus-diff-wrapper.jsx → perseus-diff-wrapper.tsx} +3 -2
- package/src/diffs/__stories__/{structured-item-diff.stories.jsx → structured-item-diff.stories.tsx} +27 -22
- package/src/diffs/__stories__/{tags-diff.stories.jsx → tags-diff.stories.tsx} +12 -14
- package/src/diffs/__stories__/{text-diff.stories.jsx → text-diff.stories.tsx} +12 -14
- package/src/diffs/__tests__/{split-diff_test.js → split-diff.test.ts} +1 -2
- package/src/diffs/__tests__/{string-array-diff_test.js → string-array-diff.test.ts} +1 -2
- package/src/diffs/__tests__/{structured-item-diff_test.js → structured-item-diff.test.ts} +15 -14
- package/src/diffs/__tests__/{widget-diff-performer_test.js → widget-diff-performer.test.ts} +1 -2
- package/src/diffs/{article-diff.jsx → article-diff.tsx} +5 -6
- package/src/diffs/{item-diff.jsx → item-diff.tsx} +4 -5
- package/src/diffs/{renderer-diff.jsx → renderer-diff.tsx} +22 -28
- package/src/diffs/{split-diff.jsx → split-diff.ts} +4 -3
- package/src/diffs/{string-array-diff.jsx → string-array-diff.ts} +8 -9
- package/src/diffs/{structured-item-diff.jsx → structured-item-diff.tsx} +32 -27
- package/src/diffs/{tags-diff.jsx → tags-diff.tsx} +15 -16
- package/src/diffs/{text-diff.jsx → text-diff.tsx} +13 -13
- package/src/diffs/{widget-diff-performer.jsx → widget-diff-performer.ts} +3 -8
- package/src/diffs/{widget-diff.jsx → widget-diff.tsx} +15 -14
- package/src/{editor-page.jsx → editor-page.tsx} +52 -60
- package/src/{editor.jsx → editor.tsx} +315 -277
- package/src/{hint-editor.jsx → hint-editor.tsx} +105 -79
- package/src/{i18n.jsx → i18n.ts} +9 -6
- package/src/{iframe-content-renderer.jsx → iframe-content-renderer.tsx} +23 -17
- package/src/{index.js → index.ts} +15 -16
- package/src/{item-editor.jsx → item-editor.tsx} +35 -30
- package/src/{item-extras-editor.jsx → item-extras-editor.tsx} +3 -4
- package/src/{katex-error-view.jsx → katex-error-view.tsx} +4 -5
- package/src/{multirenderer-editor.jsx → multirenderer-editor.tsx} +132 -127
- package/src/{section-control-button.jsx → section-control-button.tsx} +10 -9
- package/src/{stateful-article-editor.jsx → stateful-article-editor.tsx} +2 -5
- package/src/{stateful-editor-page.jsx → stateful-editor-page.tsx} +1 -3
- package/src/{testing-widgets.js → testing-widgets.ts} +5 -6
- package/src/util/{register-all-widgets-and-editors-for-testing_test.js → register-all-widgets-and-editors-for-testing.test.ts} +1 -2
- package/src/util/{register-all-widgets-and-editors-for-testing.js → register-all-widgets-and-editors-for-testing.ts} +2 -3
- package/src/widgets/__stories__/{label-image-editor.stories.jsx → label-image-editor.stories.tsx} +22 -18
- package/src/widgets/__stories__/{radio-editor.stories.jsx → radio-editor.stories.tsx} +15 -10
- package/src/widgets/{categorizer-editor.jsx → categorizer-editor.tsx} +8 -6
- package/src/widgets/{cs-program-editor.jsx → cs-program-editor.tsx} +17 -17
- package/src/widgets/{definition-editor.jsx → definition-editor.tsx} +9 -8
- package/src/widgets/{dropdown-editor.jsx → dropdown-editor.tsx} +27 -19
- package/src/widgets/{example-graphie-widget-editor.jsx → example-graphie-widget-editor.tsx} +8 -8
- package/src/widgets/{example-graphie-widget.jsx → example-graphie-widget.tsx} +14 -17
- package/src/widgets/{example-widget-editor.jsx → example-widget-editor.tsx} +10 -7
- package/src/widgets/{example-widget.jsx → example-widget.tsx} +14 -12
- package/src/widgets/{explanation-editor.jsx → explanation-editor.tsx} +12 -10
- package/src/widgets/{expression-editor.jsx → expression-editor.tsx} +36 -26
- package/src/widgets/{graded-group-editor.jsx → graded-group-editor.tsx} +18 -10
- package/src/widgets/{graded-group-set-editor.jsx → graded-group-set-editor.tsx} +15 -12
- package/src/widgets/{grapher-editor.jsx → grapher-editor.tsx} +10 -9
- package/src/widgets/{group-editor.jsx → group-editor.tsx} +11 -9
- package/src/widgets/{iframe-editor.jsx → iframe-editor.tsx} +16 -13
- package/src/widgets/{image-editor.jsx → image-editor.tsx} +4 -7
- package/src/widgets/{input-number-editor.jsx → input-number-editor.tsx} +61 -47
- package/src/widgets/interaction/{constraint-editor.jsx → constraint-editor.tsx} +21 -24
- package/src/widgets/{interaction-editor.jsx → interaction-editor.tsx} +160 -61
- package/src/widgets/{interactive-graph-editor.jsx → interactive-graph-editor.tsx} +13 -10
- package/src/widgets/label-image/__stories__/{answer-choices.stories.jsx → answer-choices.stories.tsx} +22 -17
- package/src/widgets/label-image/__stories__/{behavior.stories.jsx → behavior.stories.tsx} +9 -10
- package/src/widgets/label-image/__stories__/{marker.stories.jsx → marker.stories.tsx} +11 -12
- package/src/widgets/label-image/__stories__/{question-markers.stories.jsx → question-markers.stories.tsx} +17 -16
- package/src/widgets/label-image/__stories__/{select-image.stories.jsx → select-image.stories.tsx} +12 -13
- package/src/widgets/label-image/{answer-choices.jsx → answer-choices.tsx} +18 -18
- package/src/widgets/label-image/{behavior.jsx → behavior.tsx} +9 -11
- package/src/widgets/label-image/{marker.jsx → marker.tsx} +17 -19
- package/src/widgets/label-image/{question-markers.jsx → question-markers.tsx} +16 -21
- package/src/widgets/label-image/{select-image.jsx → select-image.tsx} +5 -7
- package/src/widgets/{label-image-editor.jsx → label-image-editor.tsx} +38 -44
- package/src/widgets/{lights-puzzle-editor.jsx → lights-puzzle-editor.tsx} +34 -24
- package/src/widgets/{matcher-editor.jsx → matcher-editor.tsx} +9 -7
- package/src/widgets/{matrix-editor.jsx → matrix-editor.tsx} +10 -9
- package/src/widgets/{measurer-editor.jsx → measurer-editor.tsx} +21 -14
- package/src/widgets/{molecule-editor.jsx → molecule-editor.tsx} +9 -8
- package/src/widgets/{number-line-editor.jsx → number-line-editor.tsx} +19 -17
- package/src/widgets/{numeric-input-editor.jsx → numeric-input-editor.tsx} +10 -10
- package/src/widgets/{orderer-editor.jsx → orderer-editor.tsx} +17 -12
- package/src/widgets/{passage-editor.jsx → passage-editor.tsx} +9 -7
- package/src/widgets/{passage-ref-editor.jsx → passage-ref-editor.tsx} +8 -6
- package/src/widgets/{passage-ref-target-editor.jsx → passage-ref-target-editor.tsx} +9 -7
- package/src/widgets/{plotter-editor.jsx → plotter-editor.tsx} +34 -33
- package/src/widgets/radio/{editor.jsx → editor.tsx} +22 -21
- package/src/widgets/{reaction-diagram-editor.jsx → reaction-diagram-editor.tsx} +14 -10
- package/src/widgets/{sequence-editor.jsx → sequence-editor.tsx} +13 -13
- package/src/widgets/{simple-markdown-tester-editor.jsx → simple-markdown-tester-editor.tsx} +11 -9
- package/src/widgets/{simple-markdown-tester.jsx → simple-markdown-tester.tsx} +8 -7
- package/src/widgets/{simulator-editor.jsx → simulator-editor.tsx} +10 -8
- package/src/widgets/{sorter-editor.jsx → sorter-editor.tsx} +8 -6
- package/src/widgets/{table-editor.jsx → table-editor.tsx} +11 -10
- package/src/widgets/{transformer-editor.jsx → transformer-editor.tsx} +37 -35
- package/src/widgets/{unit-editor.jsx → unit-editor.tsx} +31 -25
- package/src/widgets/{video-editor.jsx → video-editor.tsx} +8 -9
- package/tsconfig.json +22 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/src/all-editors.js +0 -85
- package/src/all-widgets.js +0 -10
- /package/dist/{strings.js → strings} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
declare type Props = any;
|
|
10
|
+
declare class GradedGroupEditor extends React.Component<Props> {
|
|
11
|
+
static propTypes: {|
|
|
12
|
+
title: PropTypes.Requireable<string>,
|
|
13
|
+
content: PropTypes.Requireable<string>,
|
|
14
|
+
widgets: PropTypes.Requireable<{ ... }>,
|
|
15
|
+
images: PropTypes.Requireable<{ ... }>,
|
|
16
|
+
apiOptions: PropTypes.Validator<
|
|
17
|
+
$NonMaybeType<
|
|
18
|
+
PropTypes.InferProps<{|
|
|
19
|
+
isArticle: PropTypes.Validator<boolean>,
|
|
20
|
+
onInputError: PropTypes.Validator<(...args: any[]) => any>,
|
|
21
|
+
onFocusChange: PropTypes.Validator<(...args: any[]) => any>,
|
|
22
|
+
GroupMetadataEditor: PropTypes.Validator<(...args: any[]) => any>,
|
|
23
|
+
showAlignmentOptions: PropTypes.Validator<boolean>,
|
|
24
|
+
readOnly: PropTypes.Validator<boolean>,
|
|
25
|
+
answerableCallback: PropTypes.Requireable<(...args: any[]) => any>,
|
|
26
|
+
getAnotherHint: PropTypes.Requireable<(...args: any[]) => any>,
|
|
27
|
+
interactionCallback: PropTypes.Requireable<(...args: any[]) => any>,
|
|
28
|
+
groupAnnotator: PropTypes.Validator<(...args: any[]) => any>,
|
|
29
|
+
imagePlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>,
|
|
30
|
+
widgetPlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>,
|
|
31
|
+
baseElements: PropTypes.Requireable<
|
|
32
|
+
PropTypes.InferProps<{|
|
|
33
|
+
Link: PropTypes.Requireable<(...args: any[]) => any>,
|
|
34
|
+
|}>
|
|
35
|
+
>,
|
|
36
|
+
imagePreloader: PropTypes.Requireable<(...args: any[]) => any>,
|
|
37
|
+
trackInteraction: PropTypes.Requireable<(...args: any[]) => any>,
|
|
38
|
+
customKeypad: PropTypes.Requireable<boolean>,
|
|
39
|
+
nativeKeypadProxy: PropTypes.Requireable<(...args: any[]) => any>,
|
|
40
|
+
isMobile: PropTypes.Requireable<boolean>,
|
|
41
|
+
setDrawingAreaAvailable: PropTypes.Requireable<
|
|
42
|
+
(...args: any[]) => any
|
|
43
|
+
>,
|
|
44
|
+
useDraftEditor: PropTypes.Requireable<boolean>,
|
|
45
|
+
hintProgressColor: PropTypes.Requireable<string>,
|
|
46
|
+
canScrollPage: PropTypes.Requireable<boolean>,
|
|
47
|
+
inModal: PropTypes.Requireable<boolean>,
|
|
48
|
+
crossOutEnabled: PropTypes.Requireable<boolean>,
|
|
49
|
+
editorChangeDelay: PropTypes.Requireable<number>,
|
|
50
|
+
|}>
|
|
51
|
+
>
|
|
52
|
+
>,
|
|
53
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>,
|
|
54
|
+
|};
|
|
55
|
+
static widgetName: "graded-group";
|
|
56
|
+
static defaultProps: Props;
|
|
57
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
58
|
+
handleAddHint: () => void;
|
|
59
|
+
handleRemoveHint: (arg1: SyntheticMouseEvent<>) => void;
|
|
60
|
+
render(): React.Node;
|
|
61
|
+
getSaveWarnings: () => any;
|
|
62
|
+
serialize: () => {|
|
|
63
|
+
title: string,
|
|
64
|
+
hint: any | null | void,
|
|
65
|
+
|};
|
|
66
|
+
}
|
|
67
|
+
declare export default typeof GradedGroupEditor;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type Props = any;
|
|
4
|
+
declare class GradedGroupSetEditor extends React.Component<Props> {
|
|
5
|
+
_editors: Array<any>;
|
|
6
|
+
static propTypes: {
|
|
7
|
+
apiOptions: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
8
|
+
isArticle: PropTypes.Validator<boolean>;
|
|
9
|
+
onInputError: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
|
+
onFocusChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
11
|
+
GroupMetadataEditor: PropTypes.Validator<(...args: any[]) => any>;
|
|
12
|
+
showAlignmentOptions: PropTypes.Validator<boolean>;
|
|
13
|
+
readOnly: PropTypes.Validator<boolean>;
|
|
14
|
+
answerableCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
getAnotherHint: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
|
+
interactionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
|
+
groupAnnotator: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
+
imagePlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
19
|
+
widgetPlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
20
|
+
baseElements: PropTypes.Requireable<PropTypes.InferProps<{
|
|
21
|
+
Link: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
+
}>>;
|
|
23
|
+
imagePreloader: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
+
trackInteraction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
customKeypad: PropTypes.Requireable<boolean>;
|
|
26
|
+
nativeKeypadProxy: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
isMobile: PropTypes.Requireable<boolean>;
|
|
28
|
+
setDrawingAreaAvailable: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
+
useDraftEditor: PropTypes.Requireable<boolean>;
|
|
30
|
+
hintProgressColor: PropTypes.Requireable<string>;
|
|
31
|
+
canScrollPage: PropTypes.Requireable<boolean>;
|
|
32
|
+
inModal: PropTypes.Requireable<boolean>;
|
|
33
|
+
crossOutEnabled: PropTypes.Requireable<boolean>;
|
|
34
|
+
editorChangeDelay: PropTypes.Requireable<number>;
|
|
35
|
+
}>>>;
|
|
36
|
+
gradedGroups: PropTypes.Requireable<any[]>;
|
|
37
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
38
|
+
};
|
|
39
|
+
static widgetName: "graded-group-set";
|
|
40
|
+
static defaultProps: Props;
|
|
41
|
+
UNSAFE_componentWillMount(): void;
|
|
42
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
43
|
+
getSaveWarnings: () => ReadonlyArray<any>;
|
|
44
|
+
serialize: () => {
|
|
45
|
+
gradedGroups: any;
|
|
46
|
+
};
|
|
47
|
+
renderGroups: () => React.ReactElement;
|
|
48
|
+
addGroup: () => void;
|
|
49
|
+
render(): React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
export default GradedGroupSetEditor;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
declare type Props = any;
|
|
10
|
+
declare class GradedGroupSetEditor extends React.Component<Props> {
|
|
11
|
+
_editors: Array<any>;
|
|
12
|
+
static propTypes: {|
|
|
13
|
+
apiOptions: PropTypes.Validator<
|
|
14
|
+
$NonMaybeType<
|
|
15
|
+
PropTypes.InferProps<{|
|
|
16
|
+
isArticle: PropTypes.Validator<boolean>,
|
|
17
|
+
onInputError: PropTypes.Validator<(...args: any[]) => any>,
|
|
18
|
+
onFocusChange: PropTypes.Validator<(...args: any[]) => any>,
|
|
19
|
+
GroupMetadataEditor: PropTypes.Validator<(...args: any[]) => any>,
|
|
20
|
+
showAlignmentOptions: PropTypes.Validator<boolean>,
|
|
21
|
+
readOnly: PropTypes.Validator<boolean>,
|
|
22
|
+
answerableCallback: PropTypes.Requireable<(...args: any[]) => any>,
|
|
23
|
+
getAnotherHint: PropTypes.Requireable<(...args: any[]) => any>,
|
|
24
|
+
interactionCallback: PropTypes.Requireable<(...args: any[]) => any>,
|
|
25
|
+
groupAnnotator: PropTypes.Validator<(...args: any[]) => any>,
|
|
26
|
+
imagePlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>,
|
|
27
|
+
widgetPlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>,
|
|
28
|
+
baseElements: PropTypes.Requireable<
|
|
29
|
+
PropTypes.InferProps<{|
|
|
30
|
+
Link: PropTypes.Requireable<(...args: any[]) => any>,
|
|
31
|
+
|}>
|
|
32
|
+
>,
|
|
33
|
+
imagePreloader: PropTypes.Requireable<(...args: any[]) => any>,
|
|
34
|
+
trackInteraction: PropTypes.Requireable<(...args: any[]) => any>,
|
|
35
|
+
customKeypad: PropTypes.Requireable<boolean>,
|
|
36
|
+
nativeKeypadProxy: PropTypes.Requireable<(...args: any[]) => any>,
|
|
37
|
+
isMobile: PropTypes.Requireable<boolean>,
|
|
38
|
+
setDrawingAreaAvailable: PropTypes.Requireable<
|
|
39
|
+
(...args: any[]) => any
|
|
40
|
+
>,
|
|
41
|
+
useDraftEditor: PropTypes.Requireable<boolean>,
|
|
42
|
+
hintProgressColor: PropTypes.Requireable<string>,
|
|
43
|
+
canScrollPage: PropTypes.Requireable<boolean>,
|
|
44
|
+
inModal: PropTypes.Requireable<boolean>,
|
|
45
|
+
crossOutEnabled: PropTypes.Requireable<boolean>,
|
|
46
|
+
editorChangeDelay: PropTypes.Requireable<number>,
|
|
47
|
+
|}>
|
|
48
|
+
>
|
|
49
|
+
>,
|
|
50
|
+
gradedGroups: PropTypes.Requireable<any[]>,
|
|
51
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>,
|
|
52
|
+
|};
|
|
53
|
+
static widgetName: "graded-group-set";
|
|
54
|
+
static defaultProps: Props;
|
|
55
|
+
UNSAFE_componentWillMount(): void;
|
|
56
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
57
|
+
getSaveWarnings: () => $ReadOnlyArray<any>;
|
|
58
|
+
serialize: () => {|
|
|
59
|
+
gradedGroups: any,
|
|
60
|
+
|};
|
|
61
|
+
renderGroups: () => React.Element<any>;
|
|
62
|
+
addGroup: () => void;
|
|
63
|
+
render(): React.Node;
|
|
64
|
+
}
|
|
65
|
+
declare export default typeof GradedGroupSetEditor;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Props = any;
|
|
3
|
+
declare class GrapherEditor extends React.Component<Props> {
|
|
4
|
+
static propTypes: {
|
|
5
|
+
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
6
|
+
};
|
|
7
|
+
static widgetName: "grapher";
|
|
8
|
+
static defaultProps: Props;
|
|
9
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
10
|
+
render(): React.ReactNode;
|
|
11
|
+
handleAvailableTypesChange: (newAvailableTypes: Array<any>) => void;
|
|
12
|
+
serialize: () => any;
|
|
13
|
+
}
|
|
14
|
+
export default GrapherEditor;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import * as $Flowgen$Import$prop_2d_types from "prop-types";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
declare type Props = any;
|
|
10
|
+
declare class GrapherEditor extends React.Component<Props> {
|
|
11
|
+
static propTypes: {|
|
|
12
|
+
onChange: $Flowgen$Import$prop_2d_types.Validator<(...args: any[]) => any>,
|
|
13
|
+
|};
|
|
14
|
+
static widgetName: "grapher";
|
|
15
|
+
static defaultProps: Props;
|
|
16
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
17
|
+
render(): React.Node;
|
|
18
|
+
handleAvailableTypesChange: (newAvailableTypes: Array<any>) => void;
|
|
19
|
+
serialize: () => any;
|
|
20
|
+
}
|
|
21
|
+
declare export default typeof GrapherEditor;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type Props = any;
|
|
4
|
+
declare class GroupEditor extends React.Component<Props> {
|
|
5
|
+
static propTypes: {
|
|
6
|
+
content: PropTypes.Requireable<string>;
|
|
7
|
+
widgets: PropTypes.Requireable<object>;
|
|
8
|
+
images: PropTypes.Requireable<object>;
|
|
9
|
+
metadata: PropTypes.Requireable<any>;
|
|
10
|
+
apiOptions: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
11
|
+
isArticle: PropTypes.Validator<boolean>;
|
|
12
|
+
onInputError: PropTypes.Validator<(...args: any[]) => any>;
|
|
13
|
+
onFocusChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
14
|
+
GroupMetadataEditor: PropTypes.Validator<(...args: any[]) => any>;
|
|
15
|
+
showAlignmentOptions: PropTypes.Validator<boolean>;
|
|
16
|
+
readOnly: PropTypes.Validator<boolean>;
|
|
17
|
+
answerableCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
getAnotherHint: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
+
interactionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
groupAnnotator: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
imagePlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
22
|
+
widgetPlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
23
|
+
baseElements: PropTypes.Requireable<PropTypes.InferProps<{
|
|
24
|
+
Link: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
}>>;
|
|
26
|
+
imagePreloader: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
trackInteraction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
+
customKeypad: PropTypes.Requireable<boolean>;
|
|
29
|
+
nativeKeypadProxy: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
|
+
isMobile: PropTypes.Requireable<boolean>;
|
|
31
|
+
setDrawingAreaAvailable: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
|
+
useDraftEditor: PropTypes.Requireable<boolean>;
|
|
33
|
+
hintProgressColor: PropTypes.Requireable<string>;
|
|
34
|
+
canScrollPage: PropTypes.Requireable<boolean>;
|
|
35
|
+
inModal: PropTypes.Requireable<boolean>;
|
|
36
|
+
crossOutEnabled: PropTypes.Requireable<boolean>;
|
|
37
|
+
editorChangeDelay: PropTypes.Requireable<number>;
|
|
38
|
+
}>>>;
|
|
39
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
40
|
+
};
|
|
41
|
+
static widgetName: "group";
|
|
42
|
+
static defaultProps: Props;
|
|
43
|
+
render(): React.ReactNode;
|
|
44
|
+
_renderMetadataEditor: () => React.ReactElement;
|
|
45
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
46
|
+
getSaveWarnings: () => ReadonlyArray<any>;
|
|
47
|
+
serialize: () => any;
|
|
48
|
+
}
|
|
49
|
+
export default GroupEditor;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
declare type Props = any;
|
|
10
|
+
declare class GroupEditor extends React.Component<Props> {
|
|
11
|
+
static propTypes: {|
|
|
12
|
+
content: PropTypes.Requireable<string>,
|
|
13
|
+
widgets: PropTypes.Requireable<{ ... }>,
|
|
14
|
+
images: PropTypes.Requireable<{ ... }>,
|
|
15
|
+
metadata: PropTypes.Requireable<any>,
|
|
16
|
+
apiOptions: PropTypes.Validator<
|
|
17
|
+
$NonMaybeType<
|
|
18
|
+
PropTypes.InferProps<{|
|
|
19
|
+
isArticle: PropTypes.Validator<boolean>,
|
|
20
|
+
onInputError: PropTypes.Validator<(...args: any[]) => any>,
|
|
21
|
+
onFocusChange: PropTypes.Validator<(...args: any[]) => any>,
|
|
22
|
+
GroupMetadataEditor: PropTypes.Validator<(...args: any[]) => any>,
|
|
23
|
+
showAlignmentOptions: PropTypes.Validator<boolean>,
|
|
24
|
+
readOnly: PropTypes.Validator<boolean>,
|
|
25
|
+
answerableCallback: PropTypes.Requireable<(...args: any[]) => any>,
|
|
26
|
+
getAnotherHint: PropTypes.Requireable<(...args: any[]) => any>,
|
|
27
|
+
interactionCallback: PropTypes.Requireable<(...args: any[]) => any>,
|
|
28
|
+
groupAnnotator: PropTypes.Validator<(...args: any[]) => any>,
|
|
29
|
+
imagePlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>,
|
|
30
|
+
widgetPlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>,
|
|
31
|
+
baseElements: PropTypes.Requireable<
|
|
32
|
+
PropTypes.InferProps<{|
|
|
33
|
+
Link: PropTypes.Requireable<(...args: any[]) => any>,
|
|
34
|
+
|}>
|
|
35
|
+
>,
|
|
36
|
+
imagePreloader: PropTypes.Requireable<(...args: any[]) => any>,
|
|
37
|
+
trackInteraction: PropTypes.Requireable<(...args: any[]) => any>,
|
|
38
|
+
customKeypad: PropTypes.Requireable<boolean>,
|
|
39
|
+
nativeKeypadProxy: PropTypes.Requireable<(...args: any[]) => any>,
|
|
40
|
+
isMobile: PropTypes.Requireable<boolean>,
|
|
41
|
+
setDrawingAreaAvailable: PropTypes.Requireable<
|
|
42
|
+
(...args: any[]) => any
|
|
43
|
+
>,
|
|
44
|
+
useDraftEditor: PropTypes.Requireable<boolean>,
|
|
45
|
+
hintProgressColor: PropTypes.Requireable<string>,
|
|
46
|
+
canScrollPage: PropTypes.Requireable<boolean>,
|
|
47
|
+
inModal: PropTypes.Requireable<boolean>,
|
|
48
|
+
crossOutEnabled: PropTypes.Requireable<boolean>,
|
|
49
|
+
editorChangeDelay: PropTypes.Requireable<number>,
|
|
50
|
+
|}>
|
|
51
|
+
>
|
|
52
|
+
>,
|
|
53
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>,
|
|
54
|
+
|};
|
|
55
|
+
static widgetName: "group";
|
|
56
|
+
static defaultProps: Props;
|
|
57
|
+
render(): React.Node;
|
|
58
|
+
_renderMetadataEditor: () => React.Element<any>;
|
|
59
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
60
|
+
getSaveWarnings: () => $ReadOnlyArray<any>;
|
|
61
|
+
serialize: () => any;
|
|
62
|
+
}
|
|
63
|
+
declare export default typeof GroupEditor;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type IframeEditorProps = any;
|
|
4
|
+
/**
|
|
5
|
+
* This is the main editor for this widget, to specify all the options.
|
|
6
|
+
*/
|
|
7
|
+
declare class IframeEditor extends React.Component<IframeEditorProps> {
|
|
8
|
+
static propTypes: {
|
|
9
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
|
+
};
|
|
11
|
+
static widgetName: "iframe";
|
|
12
|
+
static defaultProps: IframeEditorProps;
|
|
13
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
14
|
+
render(): React.ReactNode;
|
|
15
|
+
handleSettingsChange: (arg1: any) => void;
|
|
16
|
+
serialize: () => any;
|
|
17
|
+
}
|
|
18
|
+
export default IframeEditor;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
declare type IframeEditorProps = any;
|
|
10
|
+
/**
|
|
11
|
+
* This is the main editor for this widget, to specify all the options.
|
|
12
|
+
*/
|
|
13
|
+
declare class IframeEditor extends React.Component<IframeEditorProps> {
|
|
14
|
+
static propTypes: {|
|
|
15
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>,
|
|
16
|
+
|};
|
|
17
|
+
static widgetName: "iframe";
|
|
18
|
+
static defaultProps: IframeEditorProps;
|
|
19
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
20
|
+
render(): React.Node;
|
|
21
|
+
handleSettingsChange: (arg1: any) => void;
|
|
22
|
+
serialize: () => any;
|
|
23
|
+
}
|
|
24
|
+
declare export default typeof IframeEditor;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { InputNumber } from "@khanacademy/perseus";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { ParsedValue } from "@khanacademy/perseus";
|
|
4
|
+
type Props = {
|
|
5
|
+
value: number;
|
|
6
|
+
simplify: JSX.LibraryManagedAttributes<typeof InputNumber.widget, React.ComponentProps<typeof InputNumber.widget>>["simplify"];
|
|
7
|
+
size: JSX.LibraryManagedAttributes<typeof InputNumber.widget, React.ComponentProps<typeof InputNumber.widget>>["size"];
|
|
8
|
+
inexact: JSX.LibraryManagedAttributes<typeof InputNumber.widget, React.ComponentProps<typeof InputNumber.widget>>["reviewModeRubric"]["inexact"];
|
|
9
|
+
maxError: JSX.LibraryManagedAttributes<typeof InputNumber.widget, React.ComponentProps<typeof InputNumber.widget>>["reviewModeRubric"]["maxError"];
|
|
10
|
+
answerType: JSX.LibraryManagedAttributes<typeof InputNumber.widget, React.ComponentProps<typeof InputNumber.widget>>["answerType"];
|
|
11
|
+
rightAlign: JSX.LibraryManagedAttributes<typeof InputNumber.widget, React.ComponentProps<typeof InputNumber.widget>>["rightAlign"];
|
|
12
|
+
onChange: (arg1: {
|
|
13
|
+
value?: ParsedValue | 0;
|
|
14
|
+
simplify?: Props["simplify"];
|
|
15
|
+
size?: Props["size"];
|
|
16
|
+
inexact?: Props["inexact"];
|
|
17
|
+
maxError?: Props["maxError"];
|
|
18
|
+
answerType?: Props["answerType"];
|
|
19
|
+
rightAlign?: Props["rightAlign"];
|
|
20
|
+
}) => void;
|
|
21
|
+
};
|
|
22
|
+
type DefaultProps = {
|
|
23
|
+
value: Props["value"];
|
|
24
|
+
simplify: Props["simplify"];
|
|
25
|
+
size: Props["size"];
|
|
26
|
+
inexact: Props["inexact"];
|
|
27
|
+
maxError: Props["maxError"];
|
|
28
|
+
answerType: Props["answerType"];
|
|
29
|
+
rightAlign: Props["rightAlign"];
|
|
30
|
+
};
|
|
31
|
+
declare class InputNumberEditor extends React.Component<Props> {
|
|
32
|
+
static widgetName: "input-number";
|
|
33
|
+
static defaultProps: DefaultProps;
|
|
34
|
+
handleAnswerChange: (arg1: string) => void;
|
|
35
|
+
render(): React.ReactNode;
|
|
36
|
+
focus: () => boolean;
|
|
37
|
+
serialize: () => {
|
|
38
|
+
value: Props["value"];
|
|
39
|
+
simplify: Props["simplify"];
|
|
40
|
+
size: Props["size"];
|
|
41
|
+
inexact: Props["inexact"];
|
|
42
|
+
maxError: Props["maxError"];
|
|
43
|
+
answerType: Props["answerType"];
|
|
44
|
+
rightAlign: Props["rightAlign"];
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export default InputNumberEditor;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import { InputNumber } from "@khanacademy/perseus";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import type { ParsedValue } from "@khanacademy/perseus";
|
|
10
|
+
declare type Props = {|
|
|
11
|
+
value: number,
|
|
12
|
+
simplify: $PropertyType<
|
|
13
|
+
React.ElementConfig<typeof InputNumber.widget>,
|
|
14
|
+
"simplify"
|
|
15
|
+
>,
|
|
16
|
+
size: $PropertyType<
|
|
17
|
+
React.ElementConfig<typeof InputNumber.widget>,
|
|
18
|
+
"size"
|
|
19
|
+
>,
|
|
20
|
+
inexact: $PropertyType<
|
|
21
|
+
$PropertyType<
|
|
22
|
+
React.ElementConfig<typeof InputNumber.widget>,
|
|
23
|
+
"reviewModeRubric"
|
|
24
|
+
>,
|
|
25
|
+
"inexact"
|
|
26
|
+
>,
|
|
27
|
+
maxError: $PropertyType<
|
|
28
|
+
$PropertyType<
|
|
29
|
+
React.ElementConfig<typeof InputNumber.widget>,
|
|
30
|
+
"reviewModeRubric"
|
|
31
|
+
>,
|
|
32
|
+
"maxError"
|
|
33
|
+
>,
|
|
34
|
+
answerType: $PropertyType<
|
|
35
|
+
React.ElementConfig<typeof InputNumber.widget>,
|
|
36
|
+
"answerType"
|
|
37
|
+
>,
|
|
38
|
+
rightAlign: $PropertyType<
|
|
39
|
+
React.ElementConfig<typeof InputNumber.widget>,
|
|
40
|
+
"rightAlign"
|
|
41
|
+
>,
|
|
42
|
+
onChange: (arg1: {|
|
|
43
|
+
value?: ParsedValue | 0,
|
|
44
|
+
simplify?: $PropertyType<Props, "simplify">,
|
|
45
|
+
size?: $PropertyType<Props, "size">,
|
|
46
|
+
inexact?: $PropertyType<Props, "inexact">,
|
|
47
|
+
maxError?: $PropertyType<Props, "maxError">,
|
|
48
|
+
answerType?: $PropertyType<Props, "answerType">,
|
|
49
|
+
rightAlign?: $PropertyType<Props, "rightAlign">,
|
|
50
|
+
|}) => void,
|
|
51
|
+
|};
|
|
52
|
+
declare type DefaultProps = {|
|
|
53
|
+
value: $PropertyType<Props, "value">,
|
|
54
|
+
simplify: $PropertyType<Props, "simplify">,
|
|
55
|
+
size: $PropertyType<Props, "size">,
|
|
56
|
+
inexact: $PropertyType<Props, "inexact">,
|
|
57
|
+
maxError: $PropertyType<Props, "maxError">,
|
|
58
|
+
answerType: $PropertyType<Props, "answerType">,
|
|
59
|
+
rightAlign: $PropertyType<Props, "rightAlign">,
|
|
60
|
+
|};
|
|
61
|
+
declare class InputNumberEditor extends React.Component<Props> {
|
|
62
|
+
static widgetName: "input-number";
|
|
63
|
+
static defaultProps: DefaultProps;
|
|
64
|
+
handleAnswerChange: (arg1: string) => void;
|
|
65
|
+
render(): React.Node;
|
|
66
|
+
focus: () => boolean;
|
|
67
|
+
serialize: () => {|
|
|
68
|
+
value: $PropertyType<Props, "value">,
|
|
69
|
+
simplify: $PropertyType<Props, "simplify">,
|
|
70
|
+
size: $PropertyType<Props, "size">,
|
|
71
|
+
inexact: $PropertyType<Props, "inexact">,
|
|
72
|
+
maxError: $PropertyType<Props, "maxError">,
|
|
73
|
+
answerType: $PropertyType<Props, "answerType">,
|
|
74
|
+
rightAlign: $PropertyType<Props, "rightAlign">,
|
|
75
|
+
|};
|
|
76
|
+
}
|
|
77
|
+
declare export default typeof InputNumberEditor;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Changeable } from "@khanacademy/perseus";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type Props = Changeable.ChangeableProps & {
|
|
4
|
+
constraint: string;
|
|
5
|
+
constraintFn: string;
|
|
6
|
+
constraintXMax: string;
|
|
7
|
+
constraintXMin: string;
|
|
8
|
+
constraintYMax: string;
|
|
9
|
+
constraintYMin: string;
|
|
10
|
+
snap: number;
|
|
11
|
+
};
|
|
12
|
+
type DefaultProps = {
|
|
13
|
+
constraint: Props["constraint"];
|
|
14
|
+
constraintFn: Props["constraintFn"];
|
|
15
|
+
constraintXMax: Props["constraintXMax"];
|
|
16
|
+
constraintXMin: Props["constraintXMin"];
|
|
17
|
+
constraintYMax: Props["constraintYMax"];
|
|
18
|
+
constraintYMin: Props["constraintYMin"];
|
|
19
|
+
snap: Props["snap"];
|
|
20
|
+
};
|
|
21
|
+
declare class ConstraintEditor extends React.Component<Props> {
|
|
22
|
+
static defaultProps: DefaultProps;
|
|
23
|
+
change: (propName: string) => (value?: any, callback?: () => unknown) => unknown;
|
|
24
|
+
render(): React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export default ConstraintEditor;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import { Changeable } from "@khanacademy/perseus";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
declare type Props = {|
|
|
10
|
+
...Changeable.ChangeableProps,
|
|
11
|
+
...{|
|
|
12
|
+
constraint: string,
|
|
13
|
+
constraintFn: string,
|
|
14
|
+
constraintXMax: string,
|
|
15
|
+
constraintXMin: string,
|
|
16
|
+
constraintYMax: string,
|
|
17
|
+
constraintYMin: string,
|
|
18
|
+
snap: number,
|
|
19
|
+
|},
|
|
20
|
+
|};
|
|
21
|
+
declare type DefaultProps = {|
|
|
22
|
+
constraint: $PropertyType<Props, "constraint">,
|
|
23
|
+
constraintFn: $PropertyType<Props, "constraintFn">,
|
|
24
|
+
constraintXMax: $PropertyType<Props, "constraintXMax">,
|
|
25
|
+
constraintXMin: $PropertyType<Props, "constraintXMin">,
|
|
26
|
+
constraintYMax: $PropertyType<Props, "constraintYMax">,
|
|
27
|
+
constraintYMin: $PropertyType<Props, "constraintYMin">,
|
|
28
|
+
snap: $PropertyType<Props, "snap">,
|
|
29
|
+
|};
|
|
30
|
+
declare class ConstraintEditor extends React.Component<Props> {
|
|
31
|
+
static defaultProps: DefaultProps;
|
|
32
|
+
change: (propName: string) => (value?: any, callback?: () => mixed) => mixed;
|
|
33
|
+
render(): React.Node;
|
|
34
|
+
}
|
|
35
|
+
declare export default typeof ConstraintEditor;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type InteractionEditorProps = any;
|
|
4
|
+
type InteractionEditorState = any;
|
|
5
|
+
declare class InteractionEditor extends React.Component<InteractionEditorProps, InteractionEditorState> {
|
|
6
|
+
static propTypes: {
|
|
7
|
+
elements: PropTypes.Requireable<(object | null | undefined)[]>;
|
|
8
|
+
graph: PropTypes.Requireable<{
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
}>;
|
|
11
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
12
|
+
};
|
|
13
|
+
static widgetName: "interaction";
|
|
14
|
+
static defaultProps: InteractionEditorProps;
|
|
15
|
+
state: InteractionEditorState;
|
|
16
|
+
UNSAFE_componentWillReceiveProps(nextProps: InteractionEditorProps): void;
|
|
17
|
+
_getAllVarSubscripts(elements: ReadonlyArray<any>): ReadonlyArray<any>;
|
|
18
|
+
_getAllFunctionNames(elements: ReadonlyArray<any>): ReadonlyArray<string>;
|
|
19
|
+
_updateGraphProps: (arg1: any) => any;
|
|
20
|
+
_addNewElement: (arg1: React.ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
+
_deleteElement: (arg1: number) => void;
|
|
22
|
+
_moveElementUp: (arg1: number) => void;
|
|
23
|
+
_moveElementDown: (arg1: number) => void;
|
|
24
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
25
|
+
render(): React.ReactNode;
|
|
26
|
+
serialize: () => any;
|
|
27
|
+
}
|
|
28
|
+
export default InteractionEditor;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
declare type InteractionEditorProps = any;
|
|
10
|
+
declare type InteractionEditorState = any;
|
|
11
|
+
declare class InteractionEditor
|
|
12
|
+
extends React.Component<InteractionEditorProps, InteractionEditorState>
|
|
13
|
+
{
|
|
14
|
+
static propTypes: {|
|
|
15
|
+
elements: PropTypes.Requireable<({ ... } | null | void)[]>,
|
|
16
|
+
graph: PropTypes.Requireable<{
|
|
17
|
+
[x: string]: any,
|
|
18
|
+
}>,
|
|
19
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>,
|
|
20
|
+
|};
|
|
21
|
+
static widgetName: "interaction";
|
|
22
|
+
static defaultProps: InteractionEditorProps;
|
|
23
|
+
state: InteractionEditorState;
|
|
24
|
+
UNSAFE_componentWillReceiveProps(nextProps: InteractionEditorProps): void;
|
|
25
|
+
_getAllVarSubscripts(elements: $ReadOnlyArray<any>): $ReadOnlyArray<any>;
|
|
26
|
+
_getAllFunctionNames(elements: $ReadOnlyArray<any>): $ReadOnlyArray<string>;
|
|
27
|
+
_updateGraphProps: (arg1: any) => any;
|
|
28
|
+
_addNewElement: (arg1: SyntheticInputEvent<HTMLInputElement>) => void;
|
|
29
|
+
_deleteElement: (arg1: number) => void;
|
|
30
|
+
_moveElementUp: (arg1: number) => void;
|
|
31
|
+
_moveElementDown: (arg1: number) => void;
|
|
32
|
+
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
33
|
+
render(): React.Node;
|
|
34
|
+
serialize: () => any;
|
|
35
|
+
}
|
|
36
|
+
declare export default typeof InteractionEditor;
|