@khanacademy/perseus-editor 44.0.6 → 44.0.7
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/{widget-editor.d.ts → widget-editor-container.d.ts} +4 -4
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/mixins/changeable.d.ts +2 -1
- package/dist/widgets/numeric-input-editor/numeric-input-editor.d.ts +4 -7
- package/dist/widgets/orderer-editor/orderer-editor.d.ts +4 -5
- package/package.json +8 -10
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This.change takes prop changes as parameters, and calls
|
|
7
7
|
* this.props.onChange with the modified props.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
type ChangeFn = (newPropsOrSinglePropName: string | {
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
}, propValue?: any, callback?: () => unknown) => any;
|
|
12
12
|
/**
|
|
@@ -35,3 +35,4 @@ export type ChangeableProps = {
|
|
|
35
35
|
[key: string]: any;
|
|
36
36
|
}, callback?: (() => unknown) | null | undefined, silent?: boolean) => unknown;
|
|
37
37
|
};
|
|
38
|
+
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { type PerseusNumericInputWidgetOptions } from "@khanacademy/perseus-core";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import type { ChangeFn } from "../../mixins/changeable";
|
|
4
3
|
import type { APIOptionsWithDefaults } from "@khanacademy/perseus";
|
|
5
|
-
|
|
6
|
-
onChange: (
|
|
4
|
+
interface Props extends PerseusNumericInputWidgetOptions {
|
|
5
|
+
onChange: (options: PerseusNumericInputWidgetOptions) => void;
|
|
7
6
|
apiOptions: APIOptionsWithDefaults;
|
|
8
|
-
}
|
|
7
|
+
}
|
|
9
8
|
interface State {
|
|
10
9
|
lastStatus: string;
|
|
11
10
|
showAnswerDetails: boolean[];
|
|
@@ -26,13 +25,11 @@ declare class NumericInputEditor extends React.Component<Props, State> {
|
|
|
26
25
|
textAlign: "left" | "right" | "center";
|
|
27
26
|
};
|
|
28
27
|
constructor(props: Props);
|
|
29
|
-
|
|
28
|
+
handleChange(changes: Partial<PerseusNumericInputWidgetOptions>): void;
|
|
30
29
|
onToggleAnswers: (answerIndex: number) => void;
|
|
31
30
|
onToggleAnswerForm: (answerIndex: number, answerForm: any) => void;
|
|
32
31
|
onToggleHeading: (accordionName: string) => () => void;
|
|
33
32
|
onTrashAnswer: (choiceIndex: any) => void;
|
|
34
|
-
onSpace: (e: any, callback: any, ...args: any[]) => void;
|
|
35
|
-
onStatusChange: (choiceIndex: any) => void;
|
|
36
33
|
onEvaluationChange: (choiceIndex: any, newStatus: any) => void;
|
|
37
34
|
updateAnswer: (choiceIndex: any, update: any) => ((p3: any) => void) | undefined;
|
|
38
35
|
addAnswer: () => void;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { type PerseusOrdererWidgetOptions } from "@khanacademy/perseus-core";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
onChange: (
|
|
5
|
-
}
|
|
3
|
+
interface Props extends PerseusOrdererWidgetOptions {
|
|
4
|
+
onChange: (options: PerseusOrdererWidgetOptions) => void;
|
|
5
|
+
}
|
|
6
6
|
declare class OrdererEditor extends React.Component<Props> {
|
|
7
7
|
static defaultProps: PerseusOrdererWidgetOptions;
|
|
8
|
+
handleChange(changes: Partial<PerseusOrdererWidgetOptions>): void;
|
|
8
9
|
onOptionsChange: (whichOptions: "correctOptions" | "otherOptions", options: string[]) => void;
|
|
9
|
-
onLayoutChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
10
|
-
onHeightChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
11
10
|
serialize: () => PerseusOrdererWidgetOptions;
|
|
12
11
|
render(): React.ReactNode;
|
|
13
12
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus editors",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "44.0.
|
|
6
|
+
"version": "44.0.7",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"mafs": "^0.19.0",
|
|
30
30
|
"tiny-invariant": "1.3.1",
|
|
31
31
|
"@khanacademy/kas": "3.0.0",
|
|
32
|
-
"@khanacademy/keypad-context": "6.0.
|
|
33
|
-
"@khanacademy/kmath": "3.0.
|
|
34
|
-
"@khanacademy/math-input": "30.0.
|
|
35
|
-
"@khanacademy/perseus": "
|
|
36
|
-
"@khanacademy/perseus-core": "41.
|
|
37
|
-
"@khanacademy/perseus-linter": "6.1.
|
|
32
|
+
"@khanacademy/keypad-context": "6.0.4",
|
|
33
|
+
"@khanacademy/kmath": "3.0.5",
|
|
34
|
+
"@khanacademy/math-input": "30.0.5",
|
|
35
|
+
"@khanacademy/perseus": "91.0.0",
|
|
36
|
+
"@khanacademy/perseus-core": "41.2.0",
|
|
37
|
+
"@khanacademy/perseus-linter": "6.1.2",
|
|
38
38
|
"@khanacademy/perseus-utils": "3.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"@khanacademy/wonder-blocks-labeled-field": "4.2.0",
|
|
53
53
|
"@khanacademy/wonder-blocks-layout": "3.1.62",
|
|
54
54
|
"@khanacademy/wonder-blocks-link": "10.4.1",
|
|
55
|
-
"@khanacademy/wonder-blocks-pill": "3.1.78",
|
|
56
55
|
"@khanacademy/wonder-blocks-popover": "7.0.0",
|
|
57
56
|
"@khanacademy/wonder-blocks-switch": "3.4.14",
|
|
58
57
|
"@khanacademy/wonder-blocks-timing": "7.1.0",
|
|
@@ -85,7 +84,6 @@
|
|
|
85
84
|
"@khanacademy/wonder-blocks-labeled-field": "^4.2.0",
|
|
86
85
|
"@khanacademy/wonder-blocks-layout": "^3.1.62",
|
|
87
86
|
"@khanacademy/wonder-blocks-link": "^10.4.1",
|
|
88
|
-
"@khanacademy/wonder-blocks-pill": "^3.1.78",
|
|
89
87
|
"@khanacademy/wonder-blocks-popover": "^7.0.0",
|
|
90
88
|
"@khanacademy/wonder-blocks-switch": "^3.4.14",
|
|
91
89
|
"@khanacademy/wonder-blocks-timing": "^7.1.0",
|
|
@@ -103,7 +101,7 @@
|
|
|
103
101
|
},
|
|
104
102
|
"keywords": [],
|
|
105
103
|
"khan": {
|
|
106
|
-
"catalogHash": "
|
|
104
|
+
"catalogHash": "dcaee295c16cf219"
|
|
107
105
|
},
|
|
108
106
|
"scripts": {}
|
|
109
107
|
}
|