@khanacademy/perseus-editor 2.0.2 → 2.0.3
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 +10 -0
- package/dist/article-editor.d.ts +2 -2
- package/dist/article-editor.js.flow +2 -2
- package/dist/components/dropdown-option.d.ts +2 -2
- package/dist/components/dropdown-option.js.flow +2 -2
- package/dist/components/link.d.ts +2 -2
- package/dist/components/link.js.flow +2 -2
- package/dist/diffs/__stories__/perseus-diff-wrapper.d.ts +3 -2
- package/dist/diffs/__stories__/perseus-diff-wrapper.js.flow +3 -2
- package/dist/editor.d.ts +7 -7
- package/dist/editor.js.flow +7 -7
- package/dist/es/index.js +0 -22
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +0 -22
- package/dist/index.js.map +1 -1
- package/dist/section-control-button.d.ts +10 -1
- package/dist/section-control-button.js.flow +13 -1
- package/dist/widgets/label-image/answer-choices.d.ts +1 -1
- package/dist/widgets/label-image/answer-choices.js.flow +1 -1
- package/dist/widgets/label-image/behavior.d.ts +2 -2
- package/dist/widgets/label-image/behavior.js.flow +2 -2
- package/dist/widgets/label-image/marker.d.ts +5 -5
- package/dist/widgets/label-image/marker.js.flow +5 -7
- package/dist/widgets/label-image/question-markers.d.ts +2 -2
- package/dist/widgets/label-image/question-markers.js.flow +2 -4
- package/dist/widgets/label-image/select-image.d.ts +2 -2
- package/dist/widgets/label-image/select-image.js.flow +2 -2
- package/dist/widgets/label-image-editor.d.ts +3 -3
- package/dist/widgets/label-image-editor.js.flow +3 -3
- package/package.json +2 -2
- package/src/__stories__/section-control-button.stories.tsx +3 -3
- package/src/article-editor.tsx +2 -5
- package/src/components/dropdown-option.tsx +2 -2
- package/src/components/link.ts +2 -2
- package/src/diffs/__stories__/perseus-diff-wrapper.tsx +4 -2
- package/src/diffs/__stories__/structured-item-diff.stories.tsx +5 -9
- package/src/diffs/__stories__/tags-diff.stories.tsx +1 -1
- package/src/diffs/__stories__/text-diff.stories.tsx +1 -1
- package/src/editor.tsx +8 -10
- package/src/multirenderer-editor.tsx +6 -12
- package/src/widgets/__stories__/label-image-editor.stories.tsx +1 -1
- package/src/widgets/__stories__/radio-editor.stories.tsx +1 -1
- package/src/widgets/label-image/__stories__/answer-choices.stories.tsx +3 -7
- package/src/widgets/label-image/__stories__/behavior.stories.tsx +1 -1
- package/src/widgets/label-image/__stories__/marker.stories.tsx +2 -2
- package/src/widgets/label-image/__stories__/question-markers.stories.tsx +3 -3
- package/src/widgets/label-image/__stories__/select-image.stories.tsx +3 -3
- package/src/widgets/label-image/answer-choices.tsx +5 -5
- package/src/widgets/label-image/behavior.tsx +3 -3
- package/src/widgets/label-image/marker.tsx +5 -5
- package/src/widgets/label-image/question-markers.tsx +2 -2
- package/src/widgets/label-image/select-image.tsx +2 -5
- package/src/widgets/label-image-editor.tsx +3 -3
- package/src/widgets/numeric-input-editor.tsx +0 -20
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -4680,7 +4680,6 @@ const Header = _ref => {
|
|
|
4680
4680
|
} = _ref;
|
|
4681
4681
|
const headerLevel = Math.min(depth, 5) + 1;
|
|
4682
4682
|
const HeaderTag = "h".concat(headerLevel);
|
|
4683
|
-
// @ts-expect-error [FEI-5003] - TS2559 - Type '{ children?: ReactNode; }' has no properties in common with type 'IntrinsicAttributes'.
|
|
4684
4683
|
return /*#__PURE__*/React__namespace.createElement(HeaderTag, props);
|
|
4685
4684
|
};
|
|
4686
4685
|
|
|
@@ -12373,7 +12372,6 @@ const NumericInputEditor = createReactClass__default["default"]({
|
|
|
12373
12372
|
size: "normal",
|
|
12374
12373
|
coefficient: false,
|
|
12375
12374
|
labelText: "",
|
|
12376
|
-
multipleNumberInput: false,
|
|
12377
12375
|
rightAlign: false
|
|
12378
12376
|
};
|
|
12379
12377
|
},
|
|
@@ -12567,14 +12565,6 @@ const NumericInputEditor = createReactClass__default["default"]({
|
|
|
12567
12565
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
12568
12566
|
className: "perseus-input-number-editor"
|
|
12569
12567
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
12570
|
-
ref: e => this.multInputOption = e
|
|
12571
|
-
}, /*#__PURE__*/React__namespace.createElement("select", {
|
|
12572
|
-
onChange: this.onMultipleInputChange
|
|
12573
|
-
}, /*#__PURE__*/React__namespace.createElement("option", {
|
|
12574
|
-
value: "simple-numeric-input"
|
|
12575
|
-
}, "Ask for one correct solution"), /*#__PURE__*/React__namespace.createElement("option", {
|
|
12576
|
-
value: "multiple-numeric-input"
|
|
12577
|
-
}, "Ask for all correct solutions"))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
12578
12568
|
className: "ui-title"
|
|
12579
12569
|
}, "User input"), /*#__PURE__*/React__namespace.createElement("div", {
|
|
12580
12570
|
className: "msg-title"
|
|
@@ -12620,18 +12610,6 @@ const NumericInputEditor = createReactClass__default["default"]({
|
|
|
12620
12610
|
simplify: newStatus === "correct" ? "required" : "accepted"
|
|
12621
12611
|
});
|
|
12622
12612
|
},
|
|
12623
|
-
onMultipleInputChange: function (event) {
|
|
12624
|
-
const newOption = event.target.value;
|
|
12625
|
-
if (newOption === "multiple-numeric-input") {
|
|
12626
|
-
this.props.onChange({
|
|
12627
|
-
multipleNumberInput: true
|
|
12628
|
-
});
|
|
12629
|
-
} else {
|
|
12630
|
-
this.props.onChange({
|
|
12631
|
-
multipleNumberInput: false
|
|
12632
|
-
});
|
|
12633
|
-
}
|
|
12634
|
-
},
|
|
12635
12613
|
updateAnswer: function (choiceIndex, update) {
|
|
12636
12614
|
if (!___default["default"].isObject(update)) {
|
|
12637
12615
|
return ___default["default"].partial((choiceIndex, key, value) => {
|