@khanacademy/perseus 33.3.0 → 34.1.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/dist/components/sortable.d.ts +1 -4
- package/dist/es/index.js +721 -691
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +736 -692
- package/dist/index.js.map +1 -1
- package/dist/perseus-api.d.ts +2 -0
- package/dist/perseus-types.d.ts +3 -1
- package/dist/server-item-renderer.d.ts +2 -0
- package/dist/types.d.ts +1 -1
- package/dist/util/answer-types.d.ts +1 -1
- package/dist/widgets/__shared__/noop-validator.d.ts +11 -0
- package/dist/widgets/categorizer/categorizer-validator.d.ts +5 -0
- package/dist/widgets/categorizer/categorizer.d.ts +1 -2
- package/dist/widgets/categorizer/categorizer.types.d.ts +5 -0
- package/dist/widgets/cs-program/cs-program.d.ts +23 -17
- package/dist/widgets/definition/definition.d.ts +3 -3
- package/dist/widgets/dropdown/dropdown-validator.d.ts +4 -0
- package/dist/widgets/dropdown/dropdown.d.ts +1 -5
- package/dist/widgets/dropdown/dropdown.types.d.ts +5 -0
- package/dist/widgets/explanation/explanation.d.ts +3 -5
- package/dist/widgets/expression/expression-validator.d.ts +5 -0
- package/dist/widgets/expression/expression.d.ts +13 -6
- package/dist/widgets/expression/expression.types.d.ts +3 -0
- package/dist/widgets/expression/get-decimal-separator.d.ts +5 -0
- package/dist/widgets/iframe/iframe.d.ts +24 -15
- package/dist/widgets/image/image.d.ts +3 -3
- package/dist/widgets/input-number/input-number-validator.d.ts +41 -0
- package/dist/widgets/input-number/input-number.d.ts +1 -1
- package/dist/widgets/input-number/input-number.types.d.ts +2 -0
- package/dist/widgets/interaction/interaction.d.ts +3 -3
- package/dist/widgets/interactive-graphs/graph-locked-labels-layer.d.ts +2 -0
- package/dist/widgets/interactive-graphs/interactive-graph-question-builder.d.ts +7 -0
- package/dist/widgets/interactive-graphs/mafs-graph.d.ts +2 -1
- package/dist/widgets/interactive-graphs/reducer/interactive-graph-action.d.ts +16 -1
- package/dist/widgets/interactive-graphs/stateful-mafs-graph.d.ts +2 -1
- package/dist/widgets/interactive-graphs/types.d.ts +3 -0
- package/dist/widgets/label-image/label-image.d.ts +4 -0
- package/dist/widgets/matcher/matcher.d.ts +17 -46
- package/dist/widgets/molecule/molecule.d.ts +2 -2
- package/dist/widgets/numeric-input/numeric-input-validator.d.ts +6 -0
- package/dist/widgets/numeric-input/numeric-input.d.ts +1 -5
- package/dist/widgets/numeric-input/numeric-input.types.d.ts +5 -0
- package/dist/widgets/orderer/orderer.d.ts +6 -5
- package/dist/widgets/passage/passage.d.ts +3 -3
- package/dist/widgets/passage-ref/passage-ref.d.ts +3 -3
- package/dist/widgets/passage-ref-target/passage-ref-target.d.ts +2 -2
- package/dist/widgets/sorter/sorter.d.ts +18 -44
- package/dist/widgets/table/table.d.ts +20 -24
- package/dist/widgets/video/video.d.ts +3 -4
- package/package.json +1 -1
- package/dist/mixins/widget-jsonify-deprecated.d.ts +0 -5
|
@@ -1,62 +1,33 @@
|
|
|
1
|
-
import PropTypes from "prop-types";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
4
3
|
import type { SortableOption } from "../../components/sortable";
|
|
4
|
+
import type { PerseusMatcherWidgetOptions } from "../../perseus-types";
|
|
5
|
+
import type { WidgetProps } from "../../types";
|
|
6
|
+
type RenderProps = PerseusMatcherWidgetOptions;
|
|
7
|
+
type Rubric = PerseusMatcherWidgetOptions;
|
|
8
|
+
type Props = WidgetProps<RenderProps, Rubric>;
|
|
9
|
+
type DefaultProps = {
|
|
10
|
+
left: Props["left"];
|
|
11
|
+
right: Props["right"];
|
|
12
|
+
labels: Props["labels"];
|
|
13
|
+
orderMatters: Props["orderMatters"];
|
|
14
|
+
padding: Props["padding"];
|
|
15
|
+
problemNum: Props["problemNum"];
|
|
16
|
+
onChange: Props["onChange"];
|
|
17
|
+
linterContext: Props["linterContext"];
|
|
18
|
+
};
|
|
5
19
|
type State = {
|
|
6
20
|
leftHeight: number;
|
|
7
21
|
rightHeight: number;
|
|
8
22
|
texRendererLoaded: boolean;
|
|
9
23
|
};
|
|
10
|
-
export declare class Matcher extends React.Component<
|
|
24
|
+
export declare class Matcher extends React.Component<Props, State> {
|
|
11
25
|
static contextType: React.Context<{
|
|
12
26
|
strings: import("../../strings").PerseusStrings;
|
|
13
27
|
locale: string;
|
|
14
28
|
}>;
|
|
15
29
|
context: React.ContextType<typeof PerseusI18nContext>;
|
|
16
|
-
static
|
|
17
|
-
apiOptions: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
18
|
-
isArticle: PropTypes.Validator<boolean>;
|
|
19
|
-
onInputError: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
-
onFocusChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
-
GroupMetadataEditor: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
-
showAlignmentOptions: PropTypes.Validator<boolean>;
|
|
23
|
-
readOnly: PropTypes.Validator<boolean>;
|
|
24
|
-
answerableCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
-
getAnotherHint: PropTypes.Requireable<(...args: any[]) => any>;
|
|
26
|
-
interactionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
-
groupAnnotator: PropTypes.Validator<(...args: any[]) => any>;
|
|
28
|
-
imagePlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
29
|
-
widgetPlaceholder: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
30
|
-
baseElements: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
|
-
Link: PropTypes.Requireable<(...args: any[]) => any>;
|
|
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<(...args: any[]) => any>;
|
|
39
|
-
hintProgressColor: PropTypes.Requireable<string>;
|
|
40
|
-
canScrollPage: PropTypes.Requireable<boolean>;
|
|
41
|
-
crossOutEnabled: PropTypes.Requireable<boolean>;
|
|
42
|
-
editorChangeDelay: PropTypes.Requireable<number>;
|
|
43
|
-
}>>>;
|
|
44
|
-
labels: PropTypes.Requireable<any[]>;
|
|
45
|
-
left: PropTypes.Requireable<any[]>;
|
|
46
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
-
orderMatters: PropTypes.Requireable<boolean>;
|
|
48
|
-
padding: PropTypes.Requireable<boolean>;
|
|
49
|
-
problemNum: PropTypes.Requireable<number>;
|
|
50
|
-
right: PropTypes.Requireable<any[]>;
|
|
51
|
-
trackInteraction: PropTypes.Validator<(...args: any[]) => any>;
|
|
52
|
-
linterContext: PropTypes.Requireable<PropTypes.InferProps<{
|
|
53
|
-
contentType: PropTypes.Requireable<string>;
|
|
54
|
-
highlightLint: PropTypes.Requireable<boolean>;
|
|
55
|
-
paths: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
56
|
-
stack: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
57
|
-
}>>;
|
|
58
|
-
};
|
|
59
|
-
static defaultProps: any;
|
|
30
|
+
static defaultProps: DefaultProps;
|
|
60
31
|
state: State;
|
|
61
32
|
changeAndTrack: (arg1: any) => void;
|
|
62
33
|
onMeasureLeft: (arg1: any) => void;
|
|
@@ -31,9 +31,9 @@ type DefaultProps = {
|
|
|
31
31
|
};
|
|
32
32
|
declare class MoleculeWidget extends React.Component<Props> {
|
|
33
33
|
static defaultProps: DefaultProps;
|
|
34
|
-
simpleValidate: (
|
|
34
|
+
simpleValidate(): import("../../types").PerseusScore;
|
|
35
35
|
getUserInput: () => ReadonlyArray<ReadonlyArray<string>>;
|
|
36
|
-
validate: (
|
|
36
|
+
validate(): import("../../types").PerseusScore;
|
|
37
37
|
render(): React.ReactNode;
|
|
38
38
|
}
|
|
39
39
|
declare const _default: Readonly<{
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Rubric, UserInput } from "./numeric-input.types";
|
|
2
|
+
import type { PerseusStrings } from "../../strings";
|
|
3
|
+
import type { PerseusScore } from "../../types";
|
|
4
|
+
export declare function maybeParsePercentInput(inputValue: string | number, normalizedAnswerExpected: boolean): string | number;
|
|
5
|
+
declare function numericInputValidator(userInput: UserInput, rubric: Rubric, strings: PerseusStrings): PerseusScore;
|
|
6
|
+
export default numericInputValidator;
|
|
@@ -2,13 +2,10 @@ import * as React from "react";
|
|
|
2
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
3
|
import InputWithExamples from "../../components/input-with-examples";
|
|
4
4
|
import SimpleKeypadInput from "../../components/simple-keypad-input";
|
|
5
|
+
import type { Rubric, UserInput } from "./numeric-input.types";
|
|
5
6
|
import type { PerseusNumericInputWidgetOptions, PerseusNumericInputAnswerForm } from "../../perseus-types";
|
|
6
7
|
import type { PerseusStrings } from "../../strings";
|
|
7
8
|
import type { FocusPath, PerseusScore, WidgetProps } from "../../types";
|
|
8
|
-
type UserInput = {
|
|
9
|
-
currentValue: string;
|
|
10
|
-
};
|
|
11
|
-
export type Rubric = PerseusNumericInputWidgetOptions;
|
|
12
9
|
type ExternalProps = WidgetProps<PerseusNumericInputWidgetOptions, Rubric>;
|
|
13
10
|
type Props = ExternalProps & {
|
|
14
11
|
size: NonNullable<ExternalProps["size"]>;
|
|
@@ -61,7 +58,6 @@ export declare class NumericInput extends React.Component<Props, State> {
|
|
|
61
58
|
render(): React.ReactNode;
|
|
62
59
|
}
|
|
63
60
|
export declare const unionAnswerForms: (arg1: ReadonlyArray<ReadonlyArray<PerseusNumericInputAnswerForm>>) => ReadonlyArray<PerseusNumericInputAnswerForm>;
|
|
64
|
-
export declare function maybeParsePercentInput(inputValue: string | number, normalizedAnswerExpected: boolean): string | number;
|
|
65
61
|
declare const _default: Readonly<{
|
|
66
62
|
name: string;
|
|
67
63
|
displayName: string;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { PerseusOrdererWidgetOptions } from "../../perseus-types";
|
|
3
3
|
import type { WidgetProps } from "../../types";
|
|
4
|
+
type Position = {
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
};
|
|
4
8
|
type Rubric = PerseusOrdererWidgetOptions;
|
|
5
9
|
type RenderProps = PerseusOrdererWidgetOptions & {
|
|
6
10
|
current: any;
|
|
@@ -23,13 +27,10 @@ type OrdererState = {
|
|
|
23
27
|
dragWidth: number | null | undefined;
|
|
24
28
|
dragHeight: number | null | undefined;
|
|
25
29
|
dragContent: any;
|
|
26
|
-
offsetPos:
|
|
30
|
+
offsetPos: Position | null | undefined;
|
|
27
31
|
grabPos: any;
|
|
28
32
|
mousePos?: any;
|
|
29
|
-
animateTo:
|
|
30
|
-
top: number;
|
|
31
|
-
left: number;
|
|
32
|
-
} | null | undefined;
|
|
33
|
+
animateTo: Position | null | undefined;
|
|
33
34
|
onAnimationEnd?: (arg1: any) => void;
|
|
34
35
|
};
|
|
35
36
|
declare class Orderer extends React.Component<OrdererProps, OrdererState> {
|
|
@@ -4,7 +4,7 @@ import type { ParseState } from "./passage-markdown";
|
|
|
4
4
|
import type { SerializedHighlightSet } from "../../components/highlighting/types";
|
|
5
5
|
import type { ChangeableProps } from "../../mixins/changeable";
|
|
6
6
|
import type { PerseusPassageWidgetOptions, PerseusWidget } from "../../perseus-types";
|
|
7
|
-
import type {
|
|
7
|
+
import type { WidgetProps } from "../../types";
|
|
8
8
|
import type { SingleASTNode } from "@khanacademy/simple-markdown";
|
|
9
9
|
export declare class LineHeightMeasurer extends React.Component<Record<any, any>> {
|
|
10
10
|
_line: HTMLDivElement | null | undefined;
|
|
@@ -54,7 +54,7 @@ export declare class Passage extends React.Component<PassageProps, PassageState>
|
|
|
54
54
|
_stylesAppiedTimer: number;
|
|
55
55
|
static defaultProps: DefaultPassageProps;
|
|
56
56
|
state: PassageState;
|
|
57
|
-
static validate(
|
|
57
|
+
static validate(): import("../../types").PerseusScore;
|
|
58
58
|
componentDidMount(): void;
|
|
59
59
|
shouldComponentUpdate(nextProps: PassageProps, nextState: PassageState): any | boolean;
|
|
60
60
|
componentDidUpdate(): void;
|
|
@@ -95,7 +95,7 @@ export declare class Passage extends React.Component<PassageProps, PassageState>
|
|
|
95
95
|
* These are misc widget functions used for the widget API
|
|
96
96
|
*/
|
|
97
97
|
getUserInput(): UserInput;
|
|
98
|
-
simpleValidate(
|
|
98
|
+
simpleValidate(): import("../../types").PerseusScore;
|
|
99
99
|
/**
|
|
100
100
|
* Rendering
|
|
101
101
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
3
|
import type { PerseusPassageRefWidgetOptions } from "../../perseus-types";
|
|
4
|
-
import type { ChangeFn,
|
|
4
|
+
import type { ChangeFn, WidgetProps } from "../../types";
|
|
5
5
|
import type { LinterContextProps } from "@khanacademy/perseus-linter";
|
|
6
6
|
type UserInput = RenderProps & {
|
|
7
7
|
static: boolean | null | undefined;
|
|
@@ -37,7 +37,7 @@ declare class PassageRef extends React.Component<Props, State> {
|
|
|
37
37
|
_throttledUpdateRange: () => void;
|
|
38
38
|
static defaultProps: DefaultProps;
|
|
39
39
|
state: State;
|
|
40
|
-
static validate(
|
|
40
|
+
static validate(): import("../../types").PerseusScore;
|
|
41
41
|
componentDidMount(): void;
|
|
42
42
|
shouldComponentUpdate(nextProps: Props, nextState: State): boolean;
|
|
43
43
|
componentDidUpdate(): void;
|
|
@@ -46,7 +46,7 @@ declare class PassageRef extends React.Component<Props, State> {
|
|
|
46
46
|
change: ChangeFn;
|
|
47
47
|
_deferredUpdateRange: () => void;
|
|
48
48
|
_updateRange: () => void;
|
|
49
|
-
simpleValidate: (
|
|
49
|
+
simpleValidate(): import("../../types").PerseusScore;
|
|
50
50
|
render(): React.ReactNode;
|
|
51
51
|
}
|
|
52
52
|
declare const _default: Readonly<{
|
|
@@ -20,10 +20,10 @@ declare class PassageRefTarget extends React.Component<Props> {
|
|
|
20
20
|
}>;
|
|
21
21
|
context: React.ContextType<typeof PerseusI18nContext>;
|
|
22
22
|
static defaultProps: DefaultProps;
|
|
23
|
-
static validate(
|
|
23
|
+
static validate(): import("../../types").PerseusScore;
|
|
24
24
|
getUserInput: () => any;
|
|
25
25
|
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
26
|
-
simpleValidate: (
|
|
26
|
+
simpleValidate(): import("../../types").PerseusScore;
|
|
27
27
|
render(): React.ReactNode;
|
|
28
28
|
}
|
|
29
29
|
declare const _default: Readonly<{
|
|
@@ -1,50 +1,24 @@
|
|
|
1
|
-
import PropTypes from "prop-types";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import type { SortableOption } from "../../components/sortable";
|
|
4
|
-
|
|
3
|
+
import type { PerseusSorterWidgetOptions } from "../../perseus-types";
|
|
4
|
+
import type { WidgetProps } from "../../types";
|
|
5
|
+
type RenderProps = PerseusSorterWidgetOptions;
|
|
6
|
+
type Rubric = PerseusSorterWidgetOptions;
|
|
7
|
+
type Props = WidgetProps<RenderProps, Rubric>;
|
|
8
|
+
type DefaultProps = {
|
|
9
|
+
correct: Props["correct"];
|
|
10
|
+
layout: Props["layout"];
|
|
11
|
+
padding: Props["padding"];
|
|
12
|
+
problemNum: Props["problemNum"];
|
|
13
|
+
onChange: Props["onChange"];
|
|
14
|
+
linterContext: Props["linterContext"];
|
|
15
|
+
};
|
|
16
|
+
type State = {
|
|
17
|
+
changed: boolean;
|
|
18
|
+
};
|
|
19
|
+
declare class Sorter extends React.Component<Props, State> {
|
|
5
20
|
_isMounted: boolean;
|
|
6
|
-
static
|
|
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
|
-
hintProgressColor: PropTypes.Requireable<string>;
|
|
30
|
-
canScrollPage: PropTypes.Requireable<boolean>;
|
|
31
|
-
crossOutEnabled: PropTypes.Requireable<boolean>;
|
|
32
|
-
editorChangeDelay: PropTypes.Requireable<number>;
|
|
33
|
-
}>>>;
|
|
34
|
-
correct: PropTypes.Requireable<any[]>;
|
|
35
|
-
layout: PropTypes.Requireable<string>;
|
|
36
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
|
-
padding: PropTypes.Requireable<boolean>;
|
|
38
|
-
problemNum: PropTypes.Requireable<number>;
|
|
39
|
-
trackInteraction: PropTypes.Validator<(...args: any[]) => any>;
|
|
40
|
-
linterContext: PropTypes.Requireable<PropTypes.InferProps<{
|
|
41
|
-
contentType: PropTypes.Requireable<string>;
|
|
42
|
-
highlightLint: PropTypes.Requireable<boolean>;
|
|
43
|
-
paths: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
44
|
-
stack: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
45
|
-
}>>;
|
|
46
|
-
};
|
|
47
|
-
static defaultProps: any;
|
|
21
|
+
static defaultProps: DefaultProps;
|
|
48
22
|
static validate(state: any, rubric: any): any;
|
|
49
23
|
state: any;
|
|
50
24
|
componentDidMount(): void;
|
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
import PropTypes from "prop-types";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
|
+
import type { ChangeableProps } from "../../mixins/changeable";
|
|
4
|
+
import type { PerseusTableWidgetOptions } from "../../perseus-types";
|
|
4
5
|
import type { PerseusStrings } from "../../strings";
|
|
5
|
-
|
|
6
|
+
import type { WidgetProps } from "../../types";
|
|
7
|
+
type RenderProps = PerseusTableWidgetOptions & {
|
|
8
|
+
editableHeaders: boolean;
|
|
9
|
+
Editor: any;
|
|
10
|
+
};
|
|
11
|
+
type Rubric = PerseusTableWidgetOptions;
|
|
12
|
+
type Props = ChangeableProps & WidgetProps<RenderProps, Rubric>;
|
|
13
|
+
type DefaultProps = {
|
|
14
|
+
apiOptions: Props["apiOptions"];
|
|
15
|
+
headers: Props["headers"];
|
|
16
|
+
editableHeaders: Props["editableHeaders"];
|
|
17
|
+
rows: Props["rows"];
|
|
18
|
+
columns: Props["columns"];
|
|
19
|
+
answers: Props["answers"];
|
|
20
|
+
linterContext: Props["linterContext"];
|
|
21
|
+
};
|
|
22
|
+
declare class Table extends React.Component<Props> {
|
|
6
23
|
static contextType: React.Context<{
|
|
7
24
|
strings: PerseusStrings;
|
|
8
25
|
locale: string;
|
|
9
26
|
}>;
|
|
10
27
|
context: React.ContextType<typeof PerseusI18nContext>;
|
|
11
|
-
static
|
|
12
|
-
answers: PropTypes.Requireable<((string | null | undefined)[] | null | undefined)[]>;
|
|
13
|
-
editableHeaders: PropTypes.Requireable<boolean>;
|
|
14
|
-
Editor: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
headers: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
16
|
-
keypadElement: PropTypes.Requireable<PropTypes.InferProps<{
|
|
17
|
-
activate: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
dismiss: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
-
configure: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
-
setCursor: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
-
setKeyHandler: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
-
getDOMNode: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
-
}>>;
|
|
24
|
-
trackInteraction: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
-
linterContext: PropTypes.Requireable<PropTypes.InferProps<{
|
|
26
|
-
contentType: PropTypes.Requireable<string>;
|
|
27
|
-
highlightLint: PropTypes.Requireable<boolean>;
|
|
28
|
-
paths: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
29
|
-
stack: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
30
|
-
}>>;
|
|
31
|
-
};
|
|
32
|
-
static defaultProps: any;
|
|
28
|
+
static defaultProps: DefaultProps;
|
|
33
29
|
_getRows: () => number;
|
|
34
30
|
_getColumns: () => number;
|
|
35
31
|
getUserInput: () => any;
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
6
6
|
import type { PerseusVideoWidgetOptions } from "../../perseus-types";
|
|
7
|
-
import type {
|
|
8
|
-
type UserInput = null;
|
|
7
|
+
import type { WidgetProps } from "../../types";
|
|
9
8
|
type Rubric = PerseusVideoWidgetOptions;
|
|
10
9
|
type RenderProps = PerseusVideoWidgetOptions;
|
|
11
10
|
type Props = WidgetProps<RenderProps, Rubric> & {
|
|
@@ -25,9 +24,9 @@ declare class Video extends React.Component<Props> {
|
|
|
25
24
|
* Points for videos are tallied by the embedded video itself, in the case
|
|
26
25
|
* of Khan Academy videos.
|
|
27
26
|
*/
|
|
28
|
-
static validate(
|
|
27
|
+
static validate(): import("../../types").PerseusScore;
|
|
29
28
|
getUserInput: () => undefined | null | undefined;
|
|
30
|
-
simpleValidate: (
|
|
29
|
+
simpleValidate(): import("../../types").PerseusScore;
|
|
31
30
|
change: (...args: ReadonlyArray<unknown>) => any;
|
|
32
31
|
render(): React.ReactNode;
|
|
33
32
|
}
|
package/package.json
CHANGED