@khanacademy/perseus 1.3.5 → 1.4.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 +30 -0
- package/dist/es/index.css +3 -2
- package/dist/es/index.js +82 -61
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +3 -2
- package/dist/index.js +78 -51
- package/dist/index.js.map +1 -1
- package/package.json +33 -33
- package/src/components/__stories__/tex.stories.jsx +8 -2
- package/src/index.js +1 -1
- package/src/interactive2/movable-point.jsx +2 -4
- package/src/item-renderer.jsx +3 -6
- package/src/mixins/__tests__/{widget-prop-blacklist_test.js → widget-prop-denylist_test.js} +1 -1
- package/src/mixins/changeable.jsx +2 -2
- package/src/mixins/editor-jsonify.jsx +2 -2
- package/src/mixins/provide-keypad.jsx +3 -3
- package/src/mixins/widget-jsonify-deprecated.jsx +3 -3
- package/src/mixins/{widget-prop-blacklist.js → widget-prop-denylist.js} +2 -3
- package/src/multi-items/__tests__/__snapshots__/multi-renderer_test.js.snap +0 -10
- package/src/styles/perseus-renderer.less +0 -3
- package/src/styles/widgets/radio.less +4 -0
- package/src/types.js +1 -7
- package/src/util/react-render.js +27 -0
- package/src/util.js +1 -1
- package/src/widget-container.jsx +1 -1
- package/src/widgets/__stories__/on-screen-keypad.stories.jsx +118 -0
- package/src/widgets/__tests__/__snapshots__/categorizer_test.jsx.snap +6 -6
- package/src/widgets/__tests__/__snapshots__/definition_test.js.snap +0 -2
- package/src/widgets/__tests__/__snapshots__/graded-group-set-jipt_test.jsx.snap +3 -6
- package/src/widgets/__tests__/__snapshots__/graded-group-set_test.jsx.snap +15 -13
- package/src/widgets/__tests__/__snapshots__/graded-group_test.jsx.snap +6 -7
- package/src/widgets/__tests__/__snapshots__/group_test.jsx.snap +0 -10
- package/src/widgets/__tests__/__snapshots__/radio_test.jsx.snap +0 -104
- package/src/widgets/__tests__/__snapshots__/video_test.jsx.snap +2 -4
- package/src/widgets/__tests__/graded-group-set_test.jsx +29 -9
- package/src/widgets/categorizer.jsx +6 -1
- package/src/widgets/cs-program.jsx +1 -1
- package/src/widgets/graded-group-set.jsx +43 -39
- package/src/widgets/graded-group.jsx +3 -3
- package/src/widgets/iframe.jsx +1 -1
- package/src/widgets/input-number.jsx +2 -2
- package/src/widgets/passage-ref.jsx +2 -2
- package/src/widgets/radio/widget.jsx +7 -6
- package/src/widgets/radio.jsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 324a197c: Quick font fixup
|
|
8
|
+
- f5693311: Indicators on exercises are now accessible via the keyboard! Additionally, they use explicit list markup! 🟢⚪⚪
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 6a7f36be: Update wonder-stuff and wonder-blocks dependencies
|
|
13
|
+
- 7b94ca05: Update categorizer to have no empty "th" cells per a11y audit
|
|
14
|
+
- Updated dependencies [6a7f36be]
|
|
15
|
+
- @khanacademy/math-input@0.6.6
|
|
16
|
+
- @khanacademy/perseus-linter@0.2.4
|
|
17
|
+
- @khanacademy/pure-markdown@0.1.4
|
|
18
|
+
|
|
19
|
+
## 1.3.7
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- c238d540: Wrap all ReactDOM.render() calls in `<RenderStateRoot>` to ensure it propagates properly
|
|
24
|
+
- Updated dependencies [c238d540]
|
|
25
|
+
- @khanacademy/math-input@0.6.5
|
|
26
|
+
|
|
27
|
+
## 1.3.6
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 859d3c28: Fixes styling of input-number when answer is incorrect in review mode
|
|
32
|
+
|
|
3
33
|
## 1.3.5
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/es/index.css
CHANGED
|
@@ -2310,8 +2310,6 @@ img.zoom-img {
|
|
|
2310
2310
|
font-size: 14px;
|
|
2311
2311
|
line-height: 19.6px;
|
|
2312
2312
|
padding-left: 35px;
|
|
2313
|
-
}
|
|
2314
|
-
.framework-perseus .paragraph ul:not(.perseus-widget-radio) li {
|
|
2315
2313
|
list-style-type: disc;
|
|
2316
2314
|
}
|
|
2317
2315
|
.framework-perseus .paragraph ol {
|
|
@@ -3190,6 +3188,9 @@ body.sat-section .perseus-widget-passage {
|
|
|
3190
3188
|
.perseus-widget-radio li table {
|
|
3191
3189
|
border: 1px solid #ccc;
|
|
3192
3190
|
}
|
|
3191
|
+
.perseus-widget-radio-fieldset .instructions {
|
|
3192
|
+
font-family: "Lato", sans-serif;
|
|
3193
|
+
}
|
|
3193
3194
|
.reaction {
|
|
3194
3195
|
display: table-row;
|
|
3195
3196
|
}
|
package/dist/es/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import ReactDOM__default from 'react-dom';
|
|
|
14
14
|
import { CircularSpinner } from '@khanacademy/wonder-blocks-progress-spinner';
|
|
15
15
|
import { number, point, vector as vector$1, line, ray } from '@khanacademy/kmath';
|
|
16
16
|
import createReactClass from 'create-react-class';
|
|
17
|
+
import { RenderStateRoot, View, Text } from '@khanacademy/wonder-blocks-core';
|
|
17
18
|
import SimpleMarkdown from '@khanacademy/simple-markdown';
|
|
18
19
|
import { pureMarkdownRules } from '@khanacademy/pure-markdown';
|
|
19
20
|
import { StyleSheet, css } from 'aphrodite';
|
|
@@ -24,7 +25,6 @@ import Tooltip$1 from '@khanacademy/wonder-blocks-tooltip';
|
|
|
24
25
|
import Button from '@khanacademy/wonder-blocks-button';
|
|
25
26
|
import Clickable from '@khanacademy/wonder-blocks-clickable';
|
|
26
27
|
import Color from '@khanacademy/wonder-blocks-color';
|
|
27
|
-
import { View, Text } from '@khanacademy/wonder-blocks-core';
|
|
28
28
|
import { Strut } from '@khanacademy/wonder-blocks-layout';
|
|
29
29
|
import { Popover, PopoverContent, PopoverContentCore } from '@khanacademy/wonder-blocks-popover';
|
|
30
30
|
import { OptionItem, SingleSelect } from '@khanacademy/wonder-blocks-dropdown';
|
|
@@ -2243,7 +2243,7 @@ function widgetShouldHighlight(widget) {
|
|
|
2243
2243
|
|
|
2244
2244
|
switch (widget.type) {
|
|
2245
2245
|
/**
|
|
2246
|
-
* Highlight bar
|
|
2246
|
+
* Highlight bar denylist
|
|
2247
2247
|
*/
|
|
2248
2248
|
case "measurer":
|
|
2249
2249
|
case "protractor":
|
|
@@ -14644,6 +14644,26 @@ var iconPaths = /*#__PURE__*/Object.freeze({
|
|
|
14644
14644
|
iconMinus: iconMinus
|
|
14645
14645
|
});
|
|
14646
14646
|
|
|
14647
|
+
function render(element, container, callback) {
|
|
14648
|
+
// TODO(LP-11406): Replace this, or callers, with React Portal
|
|
14649
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
14650
|
+
return ReactDOM__default.render(
|
|
14651
|
+
/*#__PURE__*/
|
|
14652
|
+
|
|
14653
|
+
/**
|
|
14654
|
+
* `RenderStateRoot` is responsible for tracking whether it's
|
|
14655
|
+
* the initial render or subsequent renders. It's used by
|
|
14656
|
+
* `useUniqueId` and will be used by `UniqueIDProvider` and
|
|
14657
|
+
* `WithSSRPlaceholder` in the future. We're placing it as
|
|
14658
|
+
* high up in the render tree as possible to ensure that any
|
|
14659
|
+
* components using that hook or those components will function
|
|
14660
|
+
* correctly.
|
|
14661
|
+
*/
|
|
14662
|
+
React.createElement(RenderStateRoot, {
|
|
14663
|
+
throwIfNested: false
|
|
14664
|
+
}, element), container, callback);
|
|
14665
|
+
}
|
|
14666
|
+
|
|
14647
14667
|
/* eslint-disable @babel/no-invalid-this */
|
|
14648
14668
|
var add$1 = {
|
|
14649
14669
|
constrain: function constrain() {
|
|
@@ -14971,9 +14991,7 @@ _.extend(MovablePoint$5.prototype, {
|
|
|
14971
14991
|
|
|
14972
14992
|
var showTrashTooltip = () => {
|
|
14973
14993
|
this._showTooltip(container => {
|
|
14974
|
-
|
|
14975
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
14976
|
-
ReactDOM.render( /*#__PURE__*/React.createElement("span", {
|
|
14994
|
+
render( /*#__PURE__*/React.createElement("span", {
|
|
14977
14995
|
style: {
|
|
14978
14996
|
fontSize: "2em"
|
|
14979
14997
|
}
|
|
@@ -19307,7 +19325,7 @@ class WidgetContainer extends React.Component {
|
|
|
19307
19325
|
highlightLint: false
|
|
19308
19326
|
}); // Note: if you add more props here, please consider whether or not
|
|
19309
19327
|
// it should be auto-serialized (e.g. used in scoreInput()). See
|
|
19310
|
-
// widget-jsonify-deprecated.jsx and widget-prop-
|
|
19328
|
+
// widget-jsonify-deprecated.jsx and widget-prop-denylist.jsx
|
|
19311
19329
|
// We default to an empty object for style instead of null
|
|
19312
19330
|
// because of a strange bug where the static styles aren't applied
|
|
19313
19331
|
// after toggling static mode.
|
|
@@ -22257,9 +22275,7 @@ _defineProperty(InputWithExamples, "defaultProps", {
|
|
|
22257
22275
|
* automatically serializing schemaless list of attributes causes issues (e.g.
|
|
22258
22276
|
* circular JSON structures sometimes).
|
|
22259
22277
|
*
|
|
22260
|
-
* This
|
|
22261
|
-
*
|
|
22262
|
-
* TODO(TB): Go through and update usage of BLACKLIST to DENYLIST: https://khanacademy.atlassian.net/browse/LP-13149?atlOrigin=eyJpIjoiNTI0Y2UwNzQ0MzA4NDYzOGI1YWRmNjEwY2E5YzZlZWUiLCJwIjoiaiJ9
|
|
22278
|
+
* This blocks things that we know don't need to be serialized.
|
|
22263
22279
|
*/
|
|
22264
22280
|
var denylist = [// standard props "added" by react
|
|
22265
22281
|
// (technically the renderer still adds them)
|
|
@@ -23246,12 +23262,12 @@ class InputNumber extends React.Component {
|
|
|
23246
23262
|
|
|
23247
23263
|
var inputStyles = [styles$z.default, this.props.size === "small" ? styles$z.small : null, this.props.rightAlign ? styles$z.rightAlign : styles$z.leftAlign]; // Correct
|
|
23248
23264
|
|
|
23249
|
-
if (rubric && correct && this.props.currentValue) {
|
|
23265
|
+
if (rubric && correct === true && this.props.currentValue) {
|
|
23250
23266
|
inputStyles.push(styles$z.answerStateCorrect);
|
|
23251
23267
|
} // Incorrect
|
|
23252
23268
|
|
|
23253
23269
|
|
|
23254
|
-
if (rubric &&
|
|
23270
|
+
if (rubric && correct === false && this.props.currentValue) {
|
|
23255
23271
|
inputStyles.push(styles$z.answerStateIncorrect);
|
|
23256
23272
|
} // Unanswered
|
|
23257
23273
|
|
|
@@ -26312,7 +26328,7 @@ class PassageRef extends React.Component {
|
|
|
26312
26328
|
|
|
26313
26329
|
shouldComponentUpdate(nextProps, nextState) {
|
|
26314
26330
|
return !_.isEqual(this.props, nextProps) || !_.isEqual(this.state, nextState);
|
|
26315
|
-
} // TODO(
|
|
26331
|
+
} // TODO(tamarab): getUserInput needs to be updated to only return
|
|
26316
26332
|
// props input by the user. Currently returns all the widget's props.
|
|
26317
26333
|
|
|
26318
26334
|
|
|
@@ -28637,7 +28653,9 @@ class Categorizer extends React.Component {
|
|
|
28637
28653
|
|
|
28638
28654
|
var table = /*#__PURE__*/React.createElement("table", {
|
|
28639
28655
|
className: "categorizer-table " + css(styles$m.mobileTable)
|
|
28640
|
-
}, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("
|
|
28656
|
+
}, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
28657
|
+
className: css(styles$m.emptyHeaderCell)
|
|
28658
|
+
}), this.props.categories.map((category, i) => {
|
|
28641
28659
|
// Array index is the correct key here, as that's
|
|
28642
28660
|
// how category grading actually works -- no way
|
|
28643
28661
|
// to add or remove categories or items in the
|
|
@@ -28765,6 +28783,10 @@ var styles$m = StyleSheet.create({
|
|
|
28765
28783
|
color: "#ccc",
|
|
28766
28784
|
verticalAlign: "middle"
|
|
28767
28785
|
},
|
|
28786
|
+
emptyHeaderCell: {
|
|
28787
|
+
backgroundColor: "inherit",
|
|
28788
|
+
borderBottom: "2px solid #ccc"
|
|
28789
|
+
},
|
|
28768
28790
|
radioSpan: {
|
|
28769
28791
|
fontSize: 30,
|
|
28770
28792
|
paddingRight: 3,
|
|
@@ -29000,7 +29022,7 @@ class CSProgram extends React.Component {
|
|
|
29000
29022
|
url = updateQueryString$1(url, "settings", JSON.stringify(settings));
|
|
29001
29023
|
}
|
|
29002
29024
|
|
|
29003
|
-
var sandboxOptions = ["allow-popups", "allow-same-origin", "allow-scripts", "allow-top-navigation"].join(" "); // We sandbox the iframe so that we
|
|
29025
|
+
var sandboxOptions = ["allow-popups", "allow-same-origin", "allow-scripts", "allow-top-navigation"].join(" "); // We sandbox the iframe so that we allowlist only the functionality
|
|
29004
29026
|
// that we need. This makes it a bit safer in case some content
|
|
29005
29027
|
// creator "went wild".
|
|
29006
29028
|
// http://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/
|
|
@@ -29880,7 +29902,7 @@ var styles$h = StyleSheet.create({
|
|
|
29880
29902
|
padding: 0,
|
|
29881
29903
|
border: "none",
|
|
29882
29904
|
marginTop: 20,
|
|
29883
|
-
color:
|
|
29905
|
+
color: Color.blue,
|
|
29884
29906
|
cursor: "pointer",
|
|
29885
29907
|
display: "block",
|
|
29886
29908
|
clear: "both"
|
|
@@ -29888,7 +29910,7 @@ var styles$h = StyleSheet.create({
|
|
|
29888
29910
|
explanationTitle: {
|
|
29889
29911
|
backgroundColor: "unset",
|
|
29890
29912
|
marginTop: 20,
|
|
29891
|
-
color:
|
|
29913
|
+
color: Color.blue,
|
|
29892
29914
|
marginBottom: 10,
|
|
29893
29915
|
cursor: "pointer",
|
|
29894
29916
|
fontSize: 14,
|
|
@@ -29918,35 +29940,38 @@ var GradedGroup$2 = {
|
|
|
29918
29940
|
|
|
29919
29941
|
var GradedGroup = GradedGroup$2.widget;
|
|
29920
29942
|
|
|
29921
|
-
// TODO(jeremy): This indicator panel is not accessible for keyboard
|
|
29922
|
-
// navigation. Add in keyboard handling and tab indexes to make accessible.
|
|
29923
29943
|
class Indicators extends React.Component {
|
|
29924
|
-
|
|
29925
|
-
|
|
29944
|
+
constructor() {
|
|
29945
|
+
super(...arguments);
|
|
29926
29946
|
|
|
29927
|
-
|
|
29947
|
+
_defineProperty(this, "handleKeyDown", (e, i) => {
|
|
29948
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
29949
|
+
this.props.onChangeCurrentGroup(i);
|
|
29950
|
+
}
|
|
29951
|
+
});
|
|
29952
|
+
}
|
|
29928
29953
|
|
|
29929
|
-
|
|
29930
|
-
|
|
29954
|
+
render() {
|
|
29955
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
29956
|
+
className: css(styles$g.indicatorContainer)
|
|
29957
|
+
}, this.props.gradedGroups.map((_ref, i) => {
|
|
29958
|
+
var {
|
|
29959
|
+
title
|
|
29960
|
+
} = _ref;
|
|
29961
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
29931
29962
|
role: "button",
|
|
29932
29963
|
"aria-label": i18n._("Skip to %(title)s", {
|
|
29933
|
-
title
|
|
29964
|
+
title
|
|
29934
29965
|
}),
|
|
29935
|
-
key:
|
|
29936
|
-
className: css(styles$g.indicator, i ===
|
|
29937
|
-
|
|
29938
|
-
|
|
29966
|
+
key: title,
|
|
29967
|
+
className: css(styles$g.indicator, i === this.props.currentGroup && styles$g.selectedIndicator),
|
|
29968
|
+
tabIndex: 0,
|
|
29969
|
+
onClick: () => this.props.onChangeCurrentGroup(i),
|
|
29970
|
+
onKeyDown: e => this.handleKeyDown(e, i)
|
|
29971
|
+
}, i === this.props.currentGroup && /*#__PURE__*/React.createElement("span", {
|
|
29939
29972
|
className: css(a11y.srOnly)
|
|
29940
|
-
}, i18n._("Current")))
|
|
29941
|
-
};
|
|
29942
|
-
|
|
29943
|
-
for (var i = 0; i < this.props.numGroups; i++) {
|
|
29944
|
-
_loop(i);
|
|
29945
|
-
}
|
|
29946
|
-
|
|
29947
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
29948
|
-
className: css(styles$g.indicatorContainer)
|
|
29949
|
-
}, items);
|
|
29973
|
+
}, i18n._("Current")));
|
|
29974
|
+
}));
|
|
29950
29975
|
}
|
|
29951
29976
|
|
|
29952
29977
|
}
|
|
@@ -29955,10 +29980,10 @@ class Indicators extends React.Component {
|
|
|
29955
29980
|
// are currently a little confusing.
|
|
29956
29981
|
class GradedGroupSet extends React.Component {
|
|
29957
29982
|
constructor() {
|
|
29958
|
-
var
|
|
29983
|
+
var _this;
|
|
29959
29984
|
|
|
29960
29985
|
super(...arguments);
|
|
29961
|
-
|
|
29986
|
+
_this = this;
|
|
29962
29987
|
|
|
29963
29988
|
_defineProperty(this, "_childGroup", void 0);
|
|
29964
29989
|
|
|
@@ -29972,7 +29997,7 @@ class GradedGroupSet extends React.Component {
|
|
|
29972
29997
|
}
|
|
29973
29998
|
|
|
29974
29999
|
// $FlowFixMe[incompatible-call]
|
|
29975
|
-
return change.apply(
|
|
30000
|
+
return change.apply(_this, args);
|
|
29976
30001
|
});
|
|
29977
30002
|
|
|
29978
30003
|
_defineProperty(this, "getInputPaths", () => {
|
|
@@ -30060,9 +30085,8 @@ class GradedGroupSet extends React.Component {
|
|
|
30060
30085
|
}, currentGroup.title), /*#__PURE__*/React.createElement("div", {
|
|
30061
30086
|
className: css(styles$g.spacer)
|
|
30062
30087
|
}), /*#__PURE__*/React.createElement(Indicators, {
|
|
30063
|
-
numGroups: numGroups,
|
|
30064
30088
|
currentGroup: this.state.currentGroup,
|
|
30065
|
-
|
|
30089
|
+
gradedGroups: this.props.gradedGroups,
|
|
30066
30090
|
onChangeCurrentGroup: currentGroup => this.setState({
|
|
30067
30091
|
currentGroup
|
|
30068
30092
|
})
|
|
@@ -30115,25 +30139,28 @@ var styles$g = StyleSheet.create({
|
|
|
30115
30139
|
},
|
|
30116
30140
|
title: {
|
|
30117
30141
|
fontSize: 12,
|
|
30118
|
-
color:
|
|
30142
|
+
color: Color.offBlack64,
|
|
30119
30143
|
textTransform: "uppercase",
|
|
30120
30144
|
marginBottom: 11,
|
|
30121
30145
|
letterSpacing: 0.8
|
|
30122
30146
|
},
|
|
30123
30147
|
indicatorContainer: {
|
|
30124
30148
|
display: "flex",
|
|
30125
|
-
flexDirection: "row"
|
|
30149
|
+
flexDirection: "row",
|
|
30150
|
+
listStyle: "none",
|
|
30151
|
+
margin: "unset"
|
|
30126
30152
|
},
|
|
30127
30153
|
indicator: {
|
|
30128
30154
|
width: 10,
|
|
30129
30155
|
height: 10,
|
|
30130
|
-
borderRadius:
|
|
30131
|
-
|
|
30156
|
+
borderRadius: "100%",
|
|
30157
|
+
border: "3px solid",
|
|
30158
|
+
borderColor: Color.blue,
|
|
30132
30159
|
marginLeft: 5,
|
|
30133
30160
|
cursor: "pointer"
|
|
30134
30161
|
},
|
|
30135
30162
|
selectedIndicator: {
|
|
30136
|
-
backgroundColor:
|
|
30163
|
+
backgroundColor: Color.blue
|
|
30137
30164
|
},
|
|
30138
30165
|
container: {
|
|
30139
30166
|
borderTop: "1px solid ".concat(gray76),
|
|
@@ -31605,7 +31632,7 @@ class Iframe extends React.Component {
|
|
|
31605
31632
|
sandboxProperties += " allow-top-navigation"; // if (this.props.allowTopNavigation === true) {
|
|
31606
31633
|
// sandboxProperties += " allow-top-navigation";
|
|
31607
31634
|
// }
|
|
31608
|
-
// We sandbox the iframe so that we
|
|
31635
|
+
// We sandbox the iframe so that we allowlist only the functionality
|
|
31609
31636
|
// that we need. This makes it a bit safer in case some content
|
|
31610
31637
|
// creator "went wild".
|
|
31611
31638
|
// http://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/
|
|
@@ -48440,10 +48467,8 @@ var ProvideKeypad = {
|
|
|
48440
48467
|
// React tree. We may also want to add this keypad asynchronously
|
|
48441
48468
|
// or on-demand in the future.
|
|
48442
48469
|
_this._keypadContainer = document.createElement("div");
|
|
48443
|
-
(_document$body = document.body) === null || _document$body === void 0 ? void 0 : _document$body.appendChild(_this._keypadContainer);
|
|
48444
|
-
|
|
48445
|
-
|
|
48446
|
-
ReactDOM__default.render( /*#__PURE__*/React.createElement(Keypad, {
|
|
48470
|
+
(_document$body = document.body) === null || _document$body === void 0 ? void 0 : _document$body.appendChild(_this._keypadContainer);
|
|
48471
|
+
render( /*#__PURE__*/React.createElement(Keypad, {
|
|
48447
48472
|
onElementMounted: element => {
|
|
48448
48473
|
// NOTE(kevinb): The reason why this setState works is
|
|
48449
48474
|
// b/c we're calling it manually from item-renderer.jsx
|
|
@@ -49137,11 +49162,9 @@ class ItemRenderer extends React.Component {
|
|
|
49137
49162
|
// that have completely different places in the DOM, we have to do this
|
|
49138
49163
|
// strangeness instead of relying on React's normal render() method.
|
|
49139
49164
|
// TODO(alpert): Figure out how to clean this up somehow
|
|
49140
|
-
// TODO(LP-11406): Replace with React Portal
|
|
49141
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
49142
49165
|
|
|
49143
49166
|
|
|
49144
|
-
|
|
49167
|
+
render(
|
|
49145
49168
|
/*#__PURE__*/
|
|
49146
49169
|
// metadata (from item.question, aka PerseusRenderer)
|
|
49147
49170
|
// replace (also item.question, aka PerseusRenderer)
|
|
@@ -49176,10 +49199,8 @@ class ItemRenderer extends React.Component {
|
|
|
49176
49199
|
linterContext: PerseusLinter.pushContextStack(this.props.linterContext, "question")
|
|
49177
49200
|
}, this.props.item.question, {
|
|
49178
49201
|
legacyPerseusLint: this.props.legacyPerseusLint
|
|
49179
|
-
})), workArea);
|
|
49180
|
-
|
|
49181
|
-
|
|
49182
|
-
ReactDOM.render( /*#__PURE__*/React.createElement(HintsRenderer, {
|
|
49202
|
+
})), workArea);
|
|
49203
|
+
render( /*#__PURE__*/React.createElement(HintsRenderer, {
|
|
49183
49204
|
ref: node => this.hintsRenderer = node,
|
|
49184
49205
|
hints: this.props.item.hints,
|
|
49185
49206
|
hintsVisible: this.state.hintsVisible,
|
|
@@ -51489,5 +51510,5 @@ var EditorJsonify = {
|
|
|
51489
51510
|
var apiVersion = version.apiVersion;
|
|
51490
51511
|
var itemDataVersion = version.itemDataVersion;
|
|
51491
51512
|
|
|
51492
|
-
export { ApiOptions, ArrowPicker, ArticleRenderer, BaseRadio, Categorizer$1 as Categorizer, changeable as Changeable, ClassNames, ColorPicker, DashPicker, dependencies as Dependencies, EditorJsonify, ElementContainer, Errors, Expression, util as GrapherUtil, Grapher$1 as GrapherWidget, HintRenderer, HintsRenderer, InputNumber$1 as InputNumber, InteractiveGraph$1 as InteractiveGraphWidget, ItemRenderer, JiptParagraphs, context as KeypadContext, KhanColors, KhanMath, context$1 as LoadingContext, Log, Matrix$1 as MatrixWidget, MultiItems, NumericInput$1 as NumericInput, PerseusError, PerseusMarkdown, Plotter$1 as PlotterWidget, Radio, Renderer, ref as ServerItemRenderer, sizingUtils as SizingUtils, Table$1 as TableWidget, Transformer$1 as TransformerWidget, Util, denylist as
|
|
51513
|
+
export { ApiOptions, ArrowPicker, ArticleRenderer, BaseRadio, Categorizer$1 as Categorizer, changeable as Changeable, ClassNames, ColorPicker, DashPicker, dependencies as Dependencies, EditorJsonify, ElementContainer, Errors, Expression, util as GrapherUtil, Grapher$1 as GrapherWidget, HintRenderer, HintsRenderer, InputNumber$1 as InputNumber, InteractiveGraph$1 as InteractiveGraphWidget, ItemRenderer, JiptParagraphs, context as KeypadContext, KhanColors, KhanMath, context$1 as LoadingContext, Log, Matrix$1 as MatrixWidget, MultiItems, NumericInput$1 as NumericInput, PerseusError, PerseusMarkdown, Plotter$1 as PlotterWidget, Radio, Renderer, ref as ServerItemRenderer, sizingUtils as SizingUtils, Table$1 as TableWidget, Transformer$1 as TransformerWidget, Util, denylist as WIDGET_PROP_DENYLIST, WidgetJsonifyDeprecated, widgets$1 as Widgets, apiVersion, buildEmptyItemTreeForShape, buildMapper, components, constants, displaySigFigs, globalConstants, globalStyles, iconPaths as icons, init, interactiveSizes$1 as interactiveSizes, isItemRenderableByVersion, itemDataVersion, itemToTree, ItemVersion as itemVersion, mediaQueries, preprocessTex, registerAllWidgetsForTesting, shapes, traverse, violatingWidgets, allWidgets as widgets };
|
|
51493
51514
|
//# sourceMappingURL=index.js.map
|