@khanacademy/perseus-editor 2.10.0 → 2.11.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/CHANGELOG.md +11 -0
- package/dist/es/index.js +8 -10
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/widgets/__tests__/expression-editor.test.tsx +56 -0
- package/src/widgets/expression-editor.tsx +7 -7
- package/tsconfig-build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @khanacademy/perseus-editor
|
|
2
2
|
|
|
3
|
+
## 2.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#827](https://github.com/Khan/perseus/pull/827) [`c7410ccc`](https://github.com/Khan/perseus/commit/c7410ccc6254034b599e1909b3cbbd7a6c9ea9b2) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Revert defensive code in ExpressionEditor that caused a crash when an expression config's answer form was missing a `key` property.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`cdcd162e`](https://github.com/Khan/perseus/commit/cdcd162ea0902d3ff1d77b1b66ad15f2d55a86cd), [`7cb40e4c`](https://github.com/Khan/perseus/commit/7cb40e4c919be50e5ced41e4937178bbf849ec74), [`8f1f0208`](https://github.com/Khan/perseus/commit/8f1f0208fcc08e137053bfd05d330b6f8bf3522d)]:
|
|
12
|
+
- @khanacademy/perseus@14.0.0
|
|
13
|
+
|
|
3
14
|
## 2.10.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/dist/es/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import * as i18n$1 from '@khanacademy/wonder-blocks-i18n';
|
|
|
22
22
|
|
|
23
23
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
24
24
|
const libName = "@khanacademy/perseus-editor";
|
|
25
|
-
const libVersion = "2.
|
|
25
|
+
const libVersion = "2.11.0";
|
|
26
26
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
27
27
|
|
|
28
28
|
function _extends() {
|
|
@@ -26756,20 +26756,18 @@ const {
|
|
|
26756
26756
|
PropCheckBox: PropCheckBox$b,
|
|
26757
26757
|
TexButtons
|
|
26758
26758
|
} = components;
|
|
26759
|
-
const {
|
|
26760
|
-
getDependencies: getDependencies$2
|
|
26761
|
-
} = Dependencies;
|
|
26762
26759
|
|
|
26763
26760
|
// types for iterables
|
|
26764
26761
|
|
|
26765
26762
|
const parseAnswerKey = ({
|
|
26766
26763
|
key
|
|
26767
26764
|
}) => {
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
|
|
26772
|
-
|
|
26765
|
+
// We don't throw here because there is data stored in some
|
|
26766
|
+
// exercises/articles where the answer forms don't have a key. If we throw,
|
|
26767
|
+
// it blocks content editors from loading the page at all.
|
|
26768
|
+
// TODO(Jeremy): find a way to handle these answer forms that are missing
|
|
26769
|
+
// keys more gracefully.
|
|
26770
|
+
return Number.parseInt(key != null ? key : "");
|
|
26773
26771
|
};
|
|
26774
26772
|
|
|
26775
26773
|
// Pick a key that isn't currently used by an answer in answerForms
|
|
@@ -27009,7 +27007,7 @@ class ExpressionEditor extends React.Component {
|
|
|
27009
27007
|
});
|
|
27010
27008
|
const {
|
|
27011
27009
|
TeX
|
|
27012
|
-
} = getDependencies
|
|
27010
|
+
} = Dependencies.getDependencies(); // OldExpression only
|
|
27013
27011
|
|
|
27014
27012
|
buttonSetChoices.splice(1, 1, /*#__PURE__*/React.createElement("label", {
|
|
27015
27013
|
key: "show-div"
|