@khanacademy/perseus 60.0.2 → 61.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/dist/es/index.js +43 -27
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +43 -30
- package/dist/index.js.map +1 -1
- package/dist/perseus-version.d.ts +0 -4
- package/dist/types.d.ts +0 -1
- package/dist/util/test-utils.d.ts +1 -12
- package/dist/util.d.ts +5 -0
- package/dist/widgets/expression/expression.d.ts +2 -2
- package/dist/widgets/graded-group/graded-group.d.ts +2 -2
- package/dist/widgets/graded-group-set/graded-group-set.d.ts +2 -2
- package/dist/widgets/grapher/grapher.d.ts +2 -2
- package/dist/widgets/group/group.d.ts +2 -2
- package/dist/widgets/input-number/input-number.d.ts +3 -3
- package/dist/widgets/interactive-graph.d.ts +2 -2
- package/dist/widgets/interactive-graphs/types.d.ts +1 -1
- package/dist/widgets/matcher/matcher.d.ts +2 -2
- package/dist/widgets/matrix/matrix.d.ts +2 -2
- package/dist/widgets/measurer/measurer.d.ts +1 -1
- package/dist/widgets/mock-widgets/mock-widget.d.ts +2 -2
- package/dist/widgets/numeric-input/numeric-input.class.d.ts +1 -1
- package/dist/widgets/numeric-input/numeric-input.d.ts +1 -1
- package/dist/widgets/orderer/orderer.d.ts +2 -2
- package/dist/widgets/phet-simulation/phet-simulation.d.ts +1 -1
- package/dist/widgets/plotter/plotter.d.ts +2 -2
- package/dist/widgets/radio/base-radio.new.d.ts +49 -0
- package/dist/widgets/radio/choice-a11y-text.new.d.ts +14 -0
- package/dist/widgets/radio/choice-icon/choice-icon.new.d.ts +23 -0
- package/dist/widgets/radio/choice-none-above.new.d.ts +6 -0
- package/dist/widgets/radio/choice.new.d.ts +23 -0
- package/dist/widgets/radio/focus-ring.new.d.ts +19 -0
- package/dist/widgets/radio/option-status.new.d.ts +24 -0
- package/dist/widgets/radio/radio-component.new.d.ts +63 -0
- package/dist/widgets/radio/radio.d.ts +1 -1
- package/dist/widgets/radio/radio.ff.d.ts +24 -0
- package/dist/widgets/sorter/sorter.d.ts +2 -2
- package/dist/widgets/table/table.d.ts +23 -17
- package/dist/widgets/table/test-util.d.ts +2 -0
- package/package.json +11 -11
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
2
3
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
4
|
import type { ChangeableProps } from "../../mixins/changeable";
|
|
4
|
-
import type { Widget, WidgetProps } from "../../types";
|
|
5
|
-
import type { PerseusTableWidgetOptions,
|
|
6
|
-
type
|
|
5
|
+
import type { FocusPath, Widget, WidgetProps } from "../../types";
|
|
6
|
+
import type { PerseusTableWidgetOptions, PerseusTableUserInput } from "@khanacademy/perseus-core";
|
|
7
|
+
type EditorProps = {
|
|
7
8
|
editableHeaders: boolean;
|
|
8
9
|
Editor: any;
|
|
9
10
|
};
|
|
10
|
-
type
|
|
11
|
+
type RenderProps = PerseusTableWidgetOptions & EditorProps;
|
|
12
|
+
type Props = WidgetProps<PerseusTableWidgetOptions> & ChangeableProps & EditorProps;
|
|
11
13
|
type DefaultProps = {
|
|
12
14
|
apiOptions: Props["apiOptions"];
|
|
13
15
|
headers: Props["headers"];
|
|
@@ -20,28 +22,32 @@ type DefaultProps = {
|
|
|
20
22
|
declare class Table extends React.Component<Props> implements Widget {
|
|
21
23
|
static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
|
|
22
24
|
context: React.ContextType<typeof PerseusI18nContext>;
|
|
25
|
+
headerRefs: Record<string, any>;
|
|
26
|
+
answerRefs: Record<string, any>;
|
|
23
27
|
static defaultProps: DefaultProps;
|
|
24
|
-
_getRows
|
|
25
|
-
_getColumns
|
|
28
|
+
_getRows(): number;
|
|
29
|
+
_getColumns(): number;
|
|
30
|
+
_getAnswersClone(): PerseusTableUserInput;
|
|
26
31
|
getUserInput(): PerseusTableUserInput;
|
|
27
|
-
onValueChange
|
|
28
|
-
onHeaderChange
|
|
29
|
-
_handleFocus
|
|
30
|
-
_handleBlur
|
|
31
|
-
focus
|
|
32
|
-
focusInputPath
|
|
33
|
-
blurInputPath
|
|
34
|
-
getDOMNodeForPath(path:
|
|
35
|
-
getInputPaths
|
|
36
|
-
setInputValue
|
|
32
|
+
onValueChange(row: number, column: number, eventOrValue: any): void;
|
|
33
|
+
onHeaderChange(index: number, e: any): void;
|
|
34
|
+
_handleFocus(inputPath: any): void;
|
|
35
|
+
_handleBlur(inputPath: any): void;
|
|
36
|
+
focus(): boolean;
|
|
37
|
+
focusInputPath(path: FocusPath): void;
|
|
38
|
+
blurInputPath(path: FocusPath): void;
|
|
39
|
+
getDOMNodeForPath(path: FocusPath): ReturnType<typeof ReactDOM.findDOMNode>;
|
|
40
|
+
getInputPaths(): ReadonlyArray<ReadonlyArray<string>>;
|
|
41
|
+
setInputValue(path: FocusPath, newValue: string, cb: any): void;
|
|
37
42
|
render(): React.ReactNode;
|
|
38
43
|
}
|
|
44
|
+
declare function propTransform(options: Props): RenderProps;
|
|
39
45
|
declare const _default: {
|
|
40
46
|
name: string;
|
|
41
47
|
displayName: string;
|
|
42
48
|
accessible: true;
|
|
43
49
|
widget: typeof Table;
|
|
44
|
-
transform:
|
|
50
|
+
transform: typeof propTransform;
|
|
45
51
|
hidden: true;
|
|
46
52
|
isLintable: true;
|
|
47
53
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Core Perseus API (includes renderers and widgets)",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "61.0.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"@use-gesture/react": "^10.2.27",
|
|
41
41
|
"mafs": "0.19.0",
|
|
42
42
|
"uuid": "^10.0.0",
|
|
43
|
-
"@khanacademy/kas": "2.0.
|
|
44
|
-
"@khanacademy/keypad-context": "3.0.
|
|
45
|
-
"@khanacademy/kmath": "2.0.
|
|
46
|
-
"@khanacademy/math-input": "25.0.
|
|
47
|
-
"@khanacademy/perseus-core": "
|
|
48
|
-
"@khanacademy/perseus-linter": "3.0.
|
|
49
|
-
"@khanacademy/perseus-score": "5.0.
|
|
43
|
+
"@khanacademy/kas": "2.0.2",
|
|
44
|
+
"@khanacademy/keypad-context": "3.0.5",
|
|
45
|
+
"@khanacademy/kmath": "2.0.5",
|
|
46
|
+
"@khanacademy/math-input": "25.0.5",
|
|
47
|
+
"@khanacademy/perseus-core": "8.0.0",
|
|
48
|
+
"@khanacademy/perseus-linter": "3.0.5",
|
|
49
|
+
"@khanacademy/perseus-score": "5.0.2",
|
|
50
50
|
"@khanacademy/perseus-utils": "2.0.1",
|
|
51
|
-
"@khanacademy/pure-markdown": "2.0.
|
|
52
|
-
"@khanacademy/simple-markdown": "2.0.
|
|
51
|
+
"@khanacademy/pure-markdown": "2.0.2",
|
|
52
|
+
"@khanacademy/simple-markdown": "2.0.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@khanacademy/wonder-blocks-banner": "4.1.6",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"react-dom": "^18.2.0",
|
|
85
85
|
"react-popper": "^2.2.5",
|
|
86
86
|
"underscore": "^1.4.4",
|
|
87
|
-
"perseus-build-settings": "0.6.
|
|
87
|
+
"perseus-build-settings": "0.6.1"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@khanacademy/wonder-blocks-banner": "4.1.6",
|