@khanacademy/perseus-editor 28.10.1 → 28.10.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/dist/es/index.js +5 -5
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/widgets/radio/editor.d.ts +6 -2
- package/dist/widgets/radio/radio-option-content-and-image-editor.d.ts +4 -1
- package/dist/widgets/radio/radio-option-settings.d.ts +4 -1
- package/package.json +38 -38
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { RadioOptionSettingsHandle } from "./radio-option-settings";
|
|
2
3
|
import type { ChoiceMovementType } from "./radio-option-settings-actions";
|
|
3
|
-
import type {
|
|
4
|
+
import type { APIOptions } from "@khanacademy/perseus";
|
|
4
5
|
import type { PerseusRadioWidgetOptions, PerseusRadioChoice, RadioDefaultWidgetOptions } from "@khanacademy/perseus-core";
|
|
5
|
-
export interface RadioEditorProps
|
|
6
|
+
export interface RadioEditorProps {
|
|
6
7
|
apiOptions: APIOptions;
|
|
7
8
|
countChoices: boolean;
|
|
8
9
|
choices: PerseusRadioChoice[];
|
|
@@ -11,6 +12,7 @@ export interface RadioEditorProps extends Changeable.ChangeableProps {
|
|
|
11
12
|
multipleSelect: boolean;
|
|
12
13
|
deselectEnabled: boolean;
|
|
13
14
|
static: boolean;
|
|
15
|
+
onChange: (values: Partial<PerseusRadioWidgetOptions>, callback?: (() => void) | null) => void;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* An editor for adding a radio widget that allows users to select a single option from multiple choices.
|
|
@@ -18,7 +20,9 @@ export interface RadioEditorProps extends Changeable.ChangeableProps {
|
|
|
18
20
|
declare class RadioEditor extends React.Component<RadioEditorProps> {
|
|
19
21
|
static widgetName: "radio";
|
|
20
22
|
static defaultProps: RadioDefaultWidgetOptions;
|
|
23
|
+
choiceRefs: Map<string, React.RefObject<RadioOptionSettingsHandle>>;
|
|
21
24
|
componentDidMount(): void;
|
|
25
|
+
getChoiceRef: (choiceId: string) => React.RefObject<RadioOptionSettingsHandle>;
|
|
22
26
|
onMultipleSelectChange: (options: {
|
|
23
27
|
multipleSelect: boolean;
|
|
24
28
|
}) => void;
|
|
@@ -5,5 +5,8 @@ type Props = {
|
|
|
5
5
|
choiceIndex: number;
|
|
6
6
|
onContentChange: (choiceIndex: number, content: string) => void;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type RadioOptionContentAndImageEditorHandle = {
|
|
9
|
+
focus: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const RadioOptionContentAndImageEditor: React.ForwardRefExoticComponent<Props & React.RefAttributes<RadioOptionContentAndImageEditorHandle>>;
|
|
9
12
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ChoiceMovementType } from "./radio-option-settings-actions";
|
|
3
3
|
import type { PerseusRadioChoice } from "@khanacademy/perseus-core";
|
|
4
|
+
export type RadioOptionSettingsHandle = {
|
|
5
|
+
focus: () => void;
|
|
6
|
+
};
|
|
4
7
|
interface RadioOptionSettingsProps {
|
|
5
8
|
index: number;
|
|
6
9
|
choice: PerseusRadioChoice;
|
|
@@ -13,5 +16,5 @@ interface RadioOptionSettingsProps {
|
|
|
13
16
|
onDelete: () => void;
|
|
14
17
|
onMove: (choiceIndex: number, movement: ChoiceMovementType) => void;
|
|
15
18
|
}
|
|
16
|
-
export declare
|
|
19
|
+
export declare const RadioOptionSettings: React.ForwardRefExoticComponent<RadioOptionSettingsProps & React.RefAttributes<RadioOptionSettingsHandle>>;
|
|
17
20
|
export {};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus editors",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "28.10.
|
|
6
|
+
"version": "28.10.2",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"tiny-invariant": "1.3.1",
|
|
38
38
|
"@khanacademy/kas": "2.1.7",
|
|
39
39
|
"@khanacademy/keypad-context": "3.2.30",
|
|
40
|
+
"@khanacademy/math-input": "26.3.11",
|
|
40
41
|
"@khanacademy/kmath": "2.2.30",
|
|
41
|
-
"@khanacademy/perseus": "74.0.
|
|
42
|
-
"@khanacademy/math-input": "26.3.10",
|
|
42
|
+
"@khanacademy/perseus": "74.0.2",
|
|
43
43
|
"@khanacademy/perseus-core": "23.0.0",
|
|
44
44
|
"@khanacademy/perseus-score": "8.2.7",
|
|
45
45
|
"@khanacademy/perseus-linter": "4.7.0",
|
|
@@ -47,24 +47,24 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@khanacademy/mathjax-renderer": "3.0.0",
|
|
50
|
-
"@khanacademy/wonder-blocks-accordion": "3.1.
|
|
51
|
-
"@khanacademy/wonder-blocks-banner": "5.0.
|
|
52
|
-
"@khanacademy/wonder-blocks-button": "11.2
|
|
53
|
-
"@khanacademy/wonder-blocks-clickable": "8.
|
|
54
|
-
"@khanacademy/wonder-blocks-core": "12.4.
|
|
55
|
-
"@khanacademy/wonder-blocks-dropdown": "10.6.
|
|
56
|
-
"@khanacademy/wonder-blocks-form": "7.
|
|
57
|
-
"@khanacademy/wonder-blocks-icon": "5.3.
|
|
58
|
-
"@khanacademy/wonder-blocks-icon-button": "11.
|
|
59
|
-
"@khanacademy/wonder-blocks-labeled-field": "4.0.
|
|
60
|
-
"@khanacademy/wonder-blocks-layout": "3.1.
|
|
61
|
-
"@khanacademy/wonder-blocks-link": "10.
|
|
62
|
-
"@khanacademy/wonder-blocks-pill": "3.1.
|
|
63
|
-
"@khanacademy/wonder-blocks-switch": "3.3.
|
|
50
|
+
"@khanacademy/wonder-blocks-accordion": "3.1.50",
|
|
51
|
+
"@khanacademy/wonder-blocks-banner": "5.0.13",
|
|
52
|
+
"@khanacademy/wonder-blocks-button": "11.3.2",
|
|
53
|
+
"@khanacademy/wonder-blocks-clickable": "8.1.2",
|
|
54
|
+
"@khanacademy/wonder-blocks-core": "12.4.3",
|
|
55
|
+
"@khanacademy/wonder-blocks-dropdown": "10.6.7",
|
|
56
|
+
"@khanacademy/wonder-blocks-form": "7.5.3",
|
|
57
|
+
"@khanacademy/wonder-blocks-icon": "5.3.7",
|
|
58
|
+
"@khanacademy/wonder-blocks-icon-button": "11.1.3",
|
|
59
|
+
"@khanacademy/wonder-blocks-labeled-field": "4.0.14",
|
|
60
|
+
"@khanacademy/wonder-blocks-layout": "3.1.44",
|
|
61
|
+
"@khanacademy/wonder-blocks-link": "10.1.3",
|
|
62
|
+
"@khanacademy/wonder-blocks-pill": "3.1.53",
|
|
63
|
+
"@khanacademy/wonder-blocks-switch": "3.3.27",
|
|
64
64
|
"@khanacademy/wonder-blocks-timing": "7.0.4",
|
|
65
|
-
"@khanacademy/wonder-blocks-tokens": "
|
|
66
|
-
"@khanacademy/wonder-blocks-tooltip": "4.1.
|
|
67
|
-
"@khanacademy/wonder-blocks-typography": "4.2.
|
|
65
|
+
"@khanacademy/wonder-blocks-tokens": "15.0.0",
|
|
66
|
+
"@khanacademy/wonder-blocks-tooltip": "4.1.65",
|
|
67
|
+
"@khanacademy/wonder-blocks-typography": "4.2.29",
|
|
68
68
|
"@khanacademy/wonder-stuff-core": "3.0.0",
|
|
69
69
|
"@phosphor-icons/core": "2.0.2",
|
|
70
70
|
"aphrodite": "1.2.5",
|
|
@@ -79,24 +79,24 @@
|
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@khanacademy/mathjax-renderer": "^3.0.0",
|
|
82
|
-
"@khanacademy/wonder-blocks-accordion": "^3.1.
|
|
83
|
-
"@khanacademy/wonder-blocks-banner": "^5.0.
|
|
84
|
-
"@khanacademy/wonder-blocks-button": "^11.2
|
|
85
|
-
"@khanacademy/wonder-blocks-clickable": "^8.
|
|
86
|
-
"@khanacademy/wonder-blocks-core": "^12.4.
|
|
87
|
-
"@khanacademy/wonder-blocks-dropdown": "^10.6.
|
|
88
|
-
"@khanacademy/wonder-blocks-form": "^7.
|
|
89
|
-
"@khanacademy/wonder-blocks-icon": "^5.3.
|
|
90
|
-
"@khanacademy/wonder-blocks-icon-button": "^11.
|
|
91
|
-
"@khanacademy/wonder-blocks-labeled-field": "^4.0.
|
|
92
|
-
"@khanacademy/wonder-blocks-layout": "^3.1.
|
|
93
|
-
"@khanacademy/wonder-blocks-link": "^10.
|
|
94
|
-
"@khanacademy/wonder-blocks-pill": "^3.1.
|
|
95
|
-
"@khanacademy/wonder-blocks-switch": "^3.3.
|
|
82
|
+
"@khanacademy/wonder-blocks-accordion": "^3.1.50",
|
|
83
|
+
"@khanacademy/wonder-blocks-banner": "^5.0.13",
|
|
84
|
+
"@khanacademy/wonder-blocks-button": "^11.3.2",
|
|
85
|
+
"@khanacademy/wonder-blocks-clickable": "^8.1.2",
|
|
86
|
+
"@khanacademy/wonder-blocks-core": "^12.4.3",
|
|
87
|
+
"@khanacademy/wonder-blocks-dropdown": "^10.6.7",
|
|
88
|
+
"@khanacademy/wonder-blocks-form": "^7.5.3",
|
|
89
|
+
"@khanacademy/wonder-blocks-icon": "^5.3.7",
|
|
90
|
+
"@khanacademy/wonder-blocks-icon-button": "^11.1.3",
|
|
91
|
+
"@khanacademy/wonder-blocks-labeled-field": "^4.0.14",
|
|
92
|
+
"@khanacademy/wonder-blocks-layout": "^3.1.44",
|
|
93
|
+
"@khanacademy/wonder-blocks-link": "^10.1.3",
|
|
94
|
+
"@khanacademy/wonder-blocks-pill": "^3.1.53",
|
|
95
|
+
"@khanacademy/wonder-blocks-switch": "^3.3.27",
|
|
96
96
|
"@khanacademy/wonder-blocks-timing": "^7.0.4",
|
|
97
|
-
"@khanacademy/wonder-blocks-tokens": "^
|
|
98
|
-
"@khanacademy/wonder-blocks-tooltip": "^4.1.
|
|
99
|
-
"@khanacademy/wonder-blocks-typography": "^4.2.
|
|
97
|
+
"@khanacademy/wonder-blocks-tokens": "^15.0.0",
|
|
98
|
+
"@khanacademy/wonder-blocks-tooltip": "^4.1.65",
|
|
99
|
+
"@khanacademy/wonder-blocks-typography": "^4.2.29",
|
|
100
100
|
"@khanacademy/wonder-stuff-core": "^3.0.0",
|
|
101
101
|
"@phosphor-icons/core": "^2.0.2",
|
|
102
102
|
"aphrodite": "^1.2.5",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
"keywords": [],
|
|
111
111
|
"khan": {
|
|
112
|
-
"catalogHash": "
|
|
112
|
+
"catalogHash": "de8253783123cc87"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {}
|
|
115
115
|
}
|