@khanacademy/perseus-editor 5.0.2 → 5.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/dist/components/labeled-row.d.ts +10 -0
- package/dist/es/index.js +460 -284
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +455 -282
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graph-editor.d.ts +601 -237
- package/package.json +8 -2
package/dist/index.js
CHANGED
|
@@ -21,8 +21,11 @@ var kmath = require('@khanacademy/kmath');
|
|
|
21
21
|
var KAS = require('@khanacademy/kas');
|
|
22
22
|
var wonderStuffCore = require('@khanacademy/wonder-stuff-core');
|
|
23
23
|
var mathInput = require('@khanacademy/math-input');
|
|
24
|
+
var wonderBlocksDropdown = require('@khanacademy/wonder-blocks-dropdown');
|
|
25
|
+
var wonderBlocksForm = require('@khanacademy/wonder-blocks-form');
|
|
24
26
|
var Spacing = require('@khanacademy/wonder-blocks-spacing');
|
|
25
|
-
var
|
|
27
|
+
var wonderBlocksTypography = require('@khanacademy/wonder-blocks-typography');
|
|
28
|
+
var wonderBlocksTokens = require('@khanacademy/wonder-blocks-tokens');
|
|
26
29
|
var Button = require('@khanacademy/wonder-blocks-button');
|
|
27
30
|
var i18n$1 = require('@khanacademy/wonder-blocks-i18n');
|
|
28
31
|
|
|
@@ -58,13 +61,12 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
|
58
61
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
59
62
|
var KAS__namespace = /*#__PURE__*/_interopNamespace(KAS);
|
|
60
63
|
var Spacing__default = /*#__PURE__*/_interopDefaultLegacy(Spacing);
|
|
61
|
-
var Typography__namespace = /*#__PURE__*/_interopNamespace(Typography);
|
|
62
64
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
63
65
|
var i18n__namespace = /*#__PURE__*/_interopNamespace(i18n$1);
|
|
64
66
|
|
|
65
67
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
66
68
|
const libName = "@khanacademy/perseus-editor";
|
|
67
|
-
const libVersion = "5.0.
|
|
69
|
+
const libVersion = "5.0.3";
|
|
68
70
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
69
71
|
|
|
70
72
|
function _extends() {
|
|
@@ -258,13 +260,13 @@ class SectionControlButton extends React__namespace.Component {
|
|
|
258
260
|
role: "button",
|
|
259
261
|
hideDefaultFocusRing: true,
|
|
260
262
|
"aria-label": title,
|
|
261
|
-
style: styles$
|
|
263
|
+
style: styles$m.button
|
|
262
264
|
}, _ref => {
|
|
263
265
|
return /*#__PURE__*/React__namespace.createElement(InlineIcon$b, icon);
|
|
264
266
|
});
|
|
265
267
|
}
|
|
266
268
|
}
|
|
267
|
-
const styles$
|
|
269
|
+
const styles$m = aphrodite.StyleSheet.create({
|
|
268
270
|
button: {
|
|
269
271
|
backgroundColor: Color__default["default"].gold,
|
|
270
272
|
margin: 2,
|
|
@@ -20782,19 +20784,19 @@ class TexErrorView extends React__namespace.Component {
|
|
|
20782
20784
|
const {
|
|
20783
20785
|
showErrors
|
|
20784
20786
|
} = this.state;
|
|
20785
|
-
const iconStyle = showErrors ? styles$
|
|
20787
|
+
const iconStyle = showErrors ? styles$l.iconExpanded : styles$l.iconCollapsed;
|
|
20786
20788
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
20787
|
-
style: styles$
|
|
20789
|
+
style: styles$l.errorContainer
|
|
20788
20790
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
20789
|
-
style: styles$
|
|
20791
|
+
style: styles$l.title,
|
|
20790
20792
|
onClick: this.handleToggleTexErrors
|
|
20791
20793
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, {
|
|
20792
20794
|
icon: caretRight__default["default"],
|
|
20793
20795
|
style: iconStyle
|
|
20794
20796
|
}), "\xA0 TeX Errors (", errorList.length, ")"), showErrors && /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
20795
|
-
style: styles$
|
|
20797
|
+
style: styles$l.errorExplanation
|
|
20796
20798
|
}, "If your math doesn't display correctly, these errors might help you troubleshoot. Message #content-kitchen for help."), showErrors && errorList.map((e, index) => /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
20797
|
-
style: styles$
|
|
20799
|
+
style: styles$l.error,
|
|
20798
20800
|
key: index
|
|
20799
20801
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
20800
20802
|
style: {
|
|
@@ -20803,7 +20805,7 @@ class TexErrorView extends React__namespace.Component {
|
|
|
20803
20805
|
}, e.math), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, e.message))));
|
|
20804
20806
|
}
|
|
20805
20807
|
}
|
|
20806
|
-
const styles$
|
|
20808
|
+
const styles$l = aphrodite.StyleSheet.create({
|
|
20807
20809
|
title: {
|
|
20808
20810
|
backgroundColor: "#eee",
|
|
20809
20811
|
fontSize: "1.25em",
|
|
@@ -24581,12 +24583,12 @@ class SimpleButton extends React__namespace.Component {
|
|
|
24581
24583
|
...otherProps
|
|
24582
24584
|
} = this.props;
|
|
24583
24585
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
24584
|
-
className: aphrodite.css(styles$
|
|
24586
|
+
className: aphrodite.css(styles$k.baseButton, color === "green" && styles$k.green, color === "orange" && styles$k.orange),
|
|
24585
24587
|
onClick: onClick
|
|
24586
24588
|
}, otherProps), children);
|
|
24587
24589
|
}
|
|
24588
24590
|
}
|
|
24589
|
-
const styles$
|
|
24591
|
+
const styles$k = aphrodite.StyleSheet.create({
|
|
24590
24592
|
baseButton: {
|
|
24591
24593
|
top: "0",
|
|
24592
24594
|
fontSize: "11px",
|
|
@@ -24799,23 +24801,23 @@ const LeafContainer = _ref2 => {
|
|
|
24799
24801
|
} = _ref2;
|
|
24800
24802
|
const hasPreviewHeading = shape.type === "content" || shape.type === "hint";
|
|
24801
24803
|
const previewHeading = hasPreviewHeading && /*#__PURE__*/React__namespace.createElement("div", {
|
|
24802
|
-
className: aphrodite.css(styles$
|
|
24804
|
+
className: aphrodite.css(styles$j.containerHeader)
|
|
24803
24805
|
}, /*#__PURE__*/React__namespace.createElement(Header, {
|
|
24804
24806
|
depth: path.length,
|
|
24805
|
-
className: aphrodite.css(styles$
|
|
24807
|
+
className: aphrodite.css(styles$j.containerTitle)
|
|
24806
24808
|
}, capitalize(name)));
|
|
24807
24809
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
24808
|
-
className: aphrodite.css(styles$
|
|
24810
|
+
className: aphrodite.css(styles$j.container)
|
|
24809
24811
|
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
24810
|
-
className: aphrodite.css(styles$
|
|
24812
|
+
className: aphrodite.css(styles$j.row, styles$j.rowHeading)
|
|
24811
24813
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24812
|
-
className: aphrodite.css(styles$
|
|
24814
|
+
className: aphrodite.css(styles$j.columnLeft)
|
|
24813
24815
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24814
|
-
className: "pod-title " + aphrodite.css(styles$
|
|
24816
|
+
className: "pod-title " + aphrodite.css(styles$j.containerHeader)
|
|
24815
24817
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24816
|
-
className: aphrodite.css(styles$
|
|
24818
|
+
className: aphrodite.css(styles$j.containerTitle)
|
|
24817
24819
|
}, capitalize(name)), controls)), /*#__PURE__*/React__namespace.createElement("div", {
|
|
24818
|
-
className: aphrodite.css(styles$
|
|
24820
|
+
className: aphrodite.css(styles$j.columnRight)
|
|
24819
24821
|
}, previewHeading)), children);
|
|
24820
24822
|
};
|
|
24821
24823
|
const ArrayContainer = props => {
|
|
@@ -24828,11 +24830,11 @@ const ArrayContainer = props => {
|
|
|
24828
24830
|
actions
|
|
24829
24831
|
} = props;
|
|
24830
24832
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
24831
|
-
className: aphrodite.css(styles$
|
|
24833
|
+
className: aphrodite.css(styles$j.container)
|
|
24832
24834
|
}, controls && /*#__PURE__*/React__namespace.createElement("div", {
|
|
24833
|
-
className: aphrodite.css(styles$
|
|
24835
|
+
className: aphrodite.css(styles$j.columnLeft, styles$j.containerHeader)
|
|
24834
24836
|
}, controls), /*#__PURE__*/React__namespace.createElement("div", null, children), /*#__PURE__*/React__namespace.createElement("div", {
|
|
24835
|
-
className: aphrodite.css(styles$
|
|
24837
|
+
className: aphrodite.css(styles$j.columnLeft)
|
|
24836
24838
|
}, /*#__PURE__*/React__namespace.createElement("a", {
|
|
24837
24839
|
href: "javascript:void 0",
|
|
24838
24840
|
onClick: () => actions.addArrayElement(path, shape.elementShape)
|
|
@@ -24846,28 +24848,28 @@ const ObjectContainer = _ref3 => {
|
|
|
24846
24848
|
path
|
|
24847
24849
|
} = _ref3;
|
|
24848
24850
|
const headingEditor = /*#__PURE__*/React__namespace.createElement("div", {
|
|
24849
|
-
className: aphrodite.css(styles$
|
|
24851
|
+
className: aphrodite.css(styles$j.containerHeader)
|
|
24850
24852
|
}, /*#__PURE__*/React__namespace.createElement(Header, {
|
|
24851
24853
|
depth: path.length,
|
|
24852
|
-
className: aphrodite.css(styles$
|
|
24854
|
+
className: aphrodite.css(styles$j.containerTitle)
|
|
24853
24855
|
}, capitalize(name)), controls);
|
|
24854
24856
|
const headingPreview = (name || controls) && /*#__PURE__*/React__namespace.createElement("div", {
|
|
24855
|
-
className: aphrodite.css(styles$
|
|
24857
|
+
className: aphrodite.css(styles$j.containerHeader, styles$j.previewCollectionHeader)
|
|
24856
24858
|
}, /*#__PURE__*/React__namespace.createElement(Header, {
|
|
24857
24859
|
depth: path.length,
|
|
24858
|
-
className: aphrodite.css(styles$
|
|
24860
|
+
className: aphrodite.css(styles$j.containerTitle)
|
|
24859
24861
|
}, capitalize(name)));
|
|
24860
24862
|
const hasBothHeadings = headingEditor && headingPreview;
|
|
24861
24863
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
24862
|
-
className: aphrodite.css(styles$
|
|
24864
|
+
className: aphrodite.css(styles$j.container)
|
|
24863
24865
|
}, hasBothHeadings && /*#__PURE__*/React__namespace.createElement("span", {
|
|
24864
|
-
className: aphrodite.css(styles$
|
|
24866
|
+
className: aphrodite.css(styles$j.row)
|
|
24865
24867
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24866
|
-
className: aphrodite.css(styles$
|
|
24868
|
+
className: aphrodite.css(styles$j.columnLeft)
|
|
24867
24869
|
}, headingEditor), /*#__PURE__*/React__namespace.createElement("div", {
|
|
24868
|
-
className: aphrodite.css(styles$
|
|
24870
|
+
className: aphrodite.css(styles$j.columnRight)
|
|
24869
24871
|
}, headingPreview)), /*#__PURE__*/React__namespace.createElement("div", {
|
|
24870
|
-
className: aphrodite.css(path.length > 0 && styles$
|
|
24872
|
+
className: aphrodite.css(path.length > 0 && styles$j.contentIndent)
|
|
24871
24873
|
}, children));
|
|
24872
24874
|
};
|
|
24873
24875
|
|
|
@@ -24987,11 +24989,11 @@ const ItemNodeContent = withStickiness(props => {
|
|
|
24987
24989
|
className: "framework-perseus"
|
|
24988
24990
|
}, lens(renderers).get(path));
|
|
24989
24991
|
return /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24990
|
-
className: aphrodite.css(styles$
|
|
24992
|
+
className: aphrodite.css(styles$j.row)
|
|
24991
24993
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24992
|
-
className: aphrodite.css(styles$
|
|
24994
|
+
className: aphrodite.css(styles$j.columnLeft)
|
|
24993
24995
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24994
|
-
className: aphrodite.css(sticky && styles$
|
|
24996
|
+
className: aphrodite.css(sticky && styles$j.sticky)
|
|
24995
24997
|
},
|
|
24996
24998
|
/*#__PURE__*/
|
|
24997
24999
|
// @ts-expect-error - TS2769 - No overload matches this call.
|
|
@@ -24999,9 +25001,9 @@ const ItemNodeContent = withStickiness(props => {
|
|
|
24999
25001
|
onChange: newVal => actions.mergeValueAtPath(path, newVal),
|
|
25000
25002
|
apiOptions: apiOptions
|
|
25001
25003
|
})))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
25002
|
-
className: aphrodite.css(styles$
|
|
25004
|
+
className: aphrodite.css(styles$j.columnRight)
|
|
25003
25005
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25004
|
-
className: aphrodite.css(sticky && styles$
|
|
25006
|
+
className: aphrodite.css(sticky && styles$j.sticky)
|
|
25005
25007
|
}, preview))));
|
|
25006
25008
|
});
|
|
25007
25009
|
const HintNodeContent = withStickiness(props => {
|
|
@@ -25017,13 +25019,13 @@ const HintNodeContent = withStickiness(props => {
|
|
|
25017
25019
|
className: "framework-perseus"
|
|
25018
25020
|
}, lens(renderers).get(path));
|
|
25019
25021
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
25020
|
-
className: aphrodite.css(styles$
|
|
25022
|
+
className: aphrodite.css(styles$j.row)
|
|
25021
25023
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25022
|
-
className: aphrodite.css(styles$
|
|
25024
|
+
className: aphrodite.css(styles$j.columnLeft)
|
|
25023
25025
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25024
|
-
className: aphrodite.css(sticky && styles$
|
|
25026
|
+
className: aphrodite.css(sticky && styles$j.sticky)
|
|
25025
25027
|
}, /*#__PURE__*/React__namespace.createElement(HintEditor, _extends({}, data, {
|
|
25026
|
-
className: aphrodite.css(styles$
|
|
25028
|
+
className: aphrodite.css(styles$j.hintEditor),
|
|
25027
25029
|
onChange: newVal => actions.mergeValueAtPath(path, newVal),
|
|
25028
25030
|
apiOptions: apiOptions,
|
|
25029
25031
|
showTitle: false,
|
|
@@ -25038,9 +25040,9 @@ const HintNodeContent = withStickiness(props => {
|
|
|
25038
25040
|
isFirst: true,
|
|
25039
25041
|
isLast: true
|
|
25040
25042
|
})))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
25041
|
-
className: aphrodite.css(styles$
|
|
25043
|
+
className: aphrodite.css(styles$j.columnRight)
|
|
25042
25044
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25043
|
-
className: aphrodite.css(sticky && styles$
|
|
25045
|
+
className: aphrodite.css(sticky && styles$j.sticky)
|
|
25044
25046
|
}, preview)));
|
|
25045
25047
|
});
|
|
25046
25048
|
const TagsNodeContent = props => {
|
|
@@ -25057,9 +25059,9 @@ const TagsNodeContent = props => {
|
|
|
25057
25059
|
return null;
|
|
25058
25060
|
}
|
|
25059
25061
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
25060
|
-
className: aphrodite.css(styles$
|
|
25062
|
+
className: aphrodite.css(styles$j.columnLeft)
|
|
25061
25063
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25062
|
-
className: aphrodite.css(styles$
|
|
25064
|
+
className: aphrodite.css(styles$j.tagsEditor)
|
|
25063
25065
|
}, /*#__PURE__*/React__namespace.createElement(GroupMetadataEditor, {
|
|
25064
25066
|
value: data,
|
|
25065
25067
|
onChange: newVal => actions.setValueAtPath(path, newVal),
|
|
@@ -25090,23 +25092,23 @@ const ArrayNodeContent = props => {
|
|
|
25090
25092
|
const subpath = path.concat(i);
|
|
25091
25093
|
const controls = [i > 0 && /*#__PURE__*/React__namespace.createElement("div", {
|
|
25092
25094
|
key: "moveArrayElementUp",
|
|
25093
|
-
className: aphrodite.css(styles$
|
|
25095
|
+
className: aphrodite.css(styles$j.control)
|
|
25094
25096
|
}, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
|
|
25095
25097
|
color: "orange",
|
|
25096
25098
|
title: "Move up",
|
|
25097
25099
|
onClick: () => actions.moveArrayElementUp(subpath)
|
|
25098
25100
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25099
|
-
className: aphrodite.css(styles$
|
|
25101
|
+
className: aphrodite.css(styles$j.verticalFlip)
|
|
25100
25102
|
}, /*#__PURE__*/React__namespace.createElement(InlineIcon$6, iconChevronDown)))), i < data.length - 1 && /*#__PURE__*/React__namespace.createElement("div", {
|
|
25101
25103
|
key: "moveArrayElementDown",
|
|
25102
|
-
className: aphrodite.css(styles$
|
|
25104
|
+
className: aphrodite.css(styles$j.control)
|
|
25103
25105
|
}, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
|
|
25104
25106
|
color: "orange",
|
|
25105
25107
|
title: "Move down",
|
|
25106
25108
|
onClick: () => actions.moveArrayElementDown(subpath)
|
|
25107
25109
|
}, /*#__PURE__*/React__namespace.createElement(InlineIcon$6, iconChevronDown))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
25108
25110
|
key: "removeArrayElement",
|
|
25109
|
-
className: aphrodite.css(styles$
|
|
25111
|
+
className: aphrodite.css(styles$j.control)
|
|
25110
25112
|
}, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
|
|
25111
25113
|
color: "orange",
|
|
25112
25114
|
title: "Delete",
|
|
@@ -25114,7 +25116,7 @@ const ArrayNodeContent = props => {
|
|
|
25114
25116
|
}, /*#__PURE__*/React__namespace.createElement(InlineIcon$6, iconTrash$4)))];
|
|
25115
25117
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
25116
25118
|
key: i,
|
|
25117
|
-
className: aphrodite.css(styles$
|
|
25119
|
+
className: aphrodite.css(styles$j.arrayElement, !elementIsLeaf && styles$j.arrayElementAndNotLeaf)
|
|
25118
25120
|
}, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
|
|
25119
25121
|
key: i,
|
|
25120
25122
|
shape: shape.elementShape,
|
|
@@ -25140,7 +25142,7 @@ const ObjectNodeContent = props => {
|
|
|
25140
25142
|
// made sense to the shape's author is the order in which we'll iterate :)
|
|
25141
25143
|
const children = Object.keys(shape.shape).map(subkey => /*#__PURE__*/React__namespace.createElement("div", {
|
|
25142
25144
|
key: subkey,
|
|
25143
|
-
className: aphrodite.css(styles$
|
|
25145
|
+
className: aphrodite.css(styles$j.objectElement)
|
|
25144
25146
|
}, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
|
|
25145
25147
|
shape: shape.shape[subkey],
|
|
25146
25148
|
data: data[subkey],
|
|
@@ -25309,7 +25311,7 @@ class MultiRendererEditor extends React__namespace.Component {
|
|
|
25309
25311
|
}, this._renderContent());
|
|
25310
25312
|
}
|
|
25311
25313
|
}
|
|
25312
|
-
const styles$
|
|
25314
|
+
const styles$j = aphrodite.StyleSheet.create({
|
|
25313
25315
|
// This is used in a number of places throughout this file.
|
|
25314
25316
|
container: {},
|
|
25315
25317
|
// eslint-disable-next-line react-native/no-unused-styles
|
|
@@ -25461,47 +25463,47 @@ const StatefulArticleEditor = createReactClass__default["default"]({
|
|
|
25461
25463
|
screen
|
|
25462
25464
|
} = this.state;
|
|
25463
25465
|
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25464
|
-
style: styles$
|
|
25466
|
+
style: styles$i.controlBar
|
|
25465
25467
|
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
25466
|
-
style: styles$
|
|
25468
|
+
style: styles$i.controls
|
|
25467
25469
|
}, "Mode:", " ", /*#__PURE__*/React__namespace.createElement("span", {
|
|
25468
25470
|
onClick: () => this.setState({
|
|
25469
25471
|
mode: "edit"
|
|
25470
25472
|
}),
|
|
25471
|
-
style: mode === "edit" ? styles$
|
|
25473
|
+
style: mode === "edit" ? styles$i.controlSelected : styles$i.control
|
|
25472
25474
|
}, "EDIT"), " | ", /*#__PURE__*/React__namespace.createElement("span", {
|
|
25473
25475
|
onClick: () => this.setState({
|
|
25474
25476
|
mode: "preview"
|
|
25475
25477
|
}),
|
|
25476
|
-
style: mode === "preview" ? styles$
|
|
25478
|
+
style: mode === "preview" ? styles$i.controlSelected : styles$i.control
|
|
25477
25479
|
}, "PREVIEW"), " | ", /*#__PURE__*/React__namespace.createElement("span", {
|
|
25478
25480
|
onClick: () => this.setState({
|
|
25479
25481
|
mode: "json"
|
|
25480
25482
|
}),
|
|
25481
|
-
style: mode === "json" ? styles$
|
|
25483
|
+
style: mode === "json" ? styles$i.controlSelected : styles$i.control
|
|
25482
25484
|
}, "JSON")), /*#__PURE__*/React__namespace.createElement("span", {
|
|
25483
|
-
style: styles$
|
|
25485
|
+
style: styles$i.controls
|
|
25484
25486
|
}, "Screen:", " ", /*#__PURE__*/React__namespace.createElement("span", {
|
|
25485
25487
|
onClick: () => this.setState({
|
|
25486
25488
|
screen: "phone"
|
|
25487
25489
|
}),
|
|
25488
|
-
style: screen === "phone" ? styles$
|
|
25490
|
+
style: screen === "phone" ? styles$i.controlSelected : styles$i.control
|
|
25489
25491
|
}, "PHONE"), " | ", /*#__PURE__*/React__namespace.createElement("span", {
|
|
25490
25492
|
onClick: () => this.setState({
|
|
25491
25493
|
screen: "tablet"
|
|
25492
25494
|
}),
|
|
25493
|
-
style: screen === "tablet" ? styles$
|
|
25495
|
+
style: screen === "tablet" ? styles$i.controlSelected : styles$i.control
|
|
25494
25496
|
}, "TABLET"), " | ", /*#__PURE__*/React__namespace.createElement("span", {
|
|
25495
25497
|
onClick: () => this.setState({
|
|
25496
25498
|
screen: "desktop"
|
|
25497
25499
|
}),
|
|
25498
|
-
style: screen === "desktop" ? styles$
|
|
25500
|
+
style: screen === "desktop" ? styles$i.controlSelected : styles$i.control
|
|
25499
25501
|
}, "DESKTOP"))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
25500
|
-
style: styles$
|
|
25502
|
+
style: styles$i.editor
|
|
25501
25503
|
}, /*#__PURE__*/React__namespace.createElement(ArticleEditor, this.state)));
|
|
25502
25504
|
}
|
|
25503
25505
|
});
|
|
25504
|
-
const styles$
|
|
25506
|
+
const styles$i = {
|
|
25505
25507
|
controlBar: {
|
|
25506
25508
|
marginBottom: 25,
|
|
25507
25509
|
marginTop: 5
|
|
@@ -27039,10 +27041,10 @@ class GradedGroupEditor extends React__namespace.Component {
|
|
|
27039
27041
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
27040
27042
|
className: "perseus-widget-row"
|
|
27041
27043
|
}, /*#__PURE__*/React__namespace.createElement("label", {
|
|
27042
|
-
className: aphrodite.css(styles$
|
|
27044
|
+
className: aphrodite.css(styles$h.title)
|
|
27043
27045
|
}, "Title:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$6, {
|
|
27044
27046
|
value: this.props.title,
|
|
27045
|
-
className: aphrodite.css(styles$
|
|
27047
|
+
className: aphrodite.css(styles$h.input)
|
|
27046
27048
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
27047
27049
|
,
|
|
27048
27050
|
onChange: this.change("title")
|
|
@@ -27067,7 +27069,7 @@ class GradedGroupEditor extends React__namespace.Component {
|
|
|
27067
27069
|
}, /*#__PURE__*/React__namespace.createElement(InlineIcon$4, iconPlus$1), " Add a hint"), this.props.hint && /*#__PURE__*/React__namespace.createElement("div", {
|
|
27068
27070
|
className: "perseus-hint-editor"
|
|
27069
27071
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
27070
|
-
className: aphrodite.css(styles$
|
|
27072
|
+
className: aphrodite.css(styles$h.hintsTitle)
|
|
27071
27073
|
}, "Hint"), /*#__PURE__*/React__namespace.createElement(Editor, {
|
|
27072
27074
|
ref: this.hintEditor,
|
|
27073
27075
|
content: this.props.hint ? this.props.hint.content : "",
|
|
@@ -27099,7 +27101,7 @@ class GradedGroupEditor extends React__namespace.Component {
|
|
|
27099
27101
|
};
|
|
27100
27102
|
};
|
|
27101
27103
|
}
|
|
27102
|
-
const styles$
|
|
27104
|
+
const styles$h = aphrodite.StyleSheet.create({
|
|
27103
27105
|
title: {
|
|
27104
27106
|
fontSize: 18,
|
|
27105
27107
|
fontWeight: "bold"
|
|
@@ -28462,13 +28464,13 @@ function MathquillInput(props) {
|
|
|
28462
28464
|
}
|
|
28463
28465
|
});
|
|
28464
28466
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
28465
|
-
style: styles$
|
|
28467
|
+
style: styles$g.outerWrapper
|
|
28466
28468
|
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
28467
28469
|
ref: mathFieldWrapperRef,
|
|
28468
28470
|
className: "perseus-math-input mq-editable-field mq-math-mode"
|
|
28469
28471
|
}));
|
|
28470
28472
|
}
|
|
28471
|
-
const styles$
|
|
28473
|
+
const styles$g = aphrodite.StyleSheet.create({
|
|
28472
28474
|
outerWrapper: {
|
|
28473
28475
|
display: "inline-block",
|
|
28474
28476
|
borderStyle: "solid",
|
|
@@ -29546,48 +29548,107 @@ const GraphPointsCountSelector = _ref => {
|
|
|
29546
29548
|
numPoints = 1,
|
|
29547
29549
|
onChange
|
|
29548
29550
|
} = _ref;
|
|
29549
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
29550
|
-
|
|
29551
|
-
onChange:
|
|
29552
|
-
onChange(parsePointCount(
|
|
29551
|
+
return /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
29552
|
+
selectedValue: `${numPoints}`,
|
|
29553
|
+
onChange: newValue => {
|
|
29554
|
+
onChange(parsePointCount(newValue));
|
|
29553
29555
|
}
|
|
29554
|
-
|
|
29556
|
+
// Never uses placeholder, always has value
|
|
29557
|
+
,
|
|
29558
|
+
placeholder: "",
|
|
29559
|
+
style: styles$f.singleSelectShort
|
|
29560
|
+
}, [...[...Array(7).keys()].map(n => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29555
29561
|
key: n,
|
|
29556
|
-
value: n
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29562
|
+
value: `${n}`,
|
|
29563
|
+
label: `${n} point${n > 1 ? "s" : ""}`
|
|
29564
|
+
})), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29565
|
+
value: UNLIMITED,
|
|
29566
|
+
label: "unlimited"
|
|
29567
|
+
})]);
|
|
29560
29568
|
};
|
|
29569
|
+
const styles$f = aphrodite.StyleSheet.create({
|
|
29570
|
+
singleSelectShort: {
|
|
29571
|
+
// Non-standard spacing, but it's the smallest we can go
|
|
29572
|
+
// without running into styling issues with the dropdown.
|
|
29573
|
+
height: 26
|
|
29574
|
+
}
|
|
29575
|
+
});
|
|
29561
29576
|
|
|
29562
29577
|
const GraphTypeSelector = props => {
|
|
29563
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
29564
|
-
|
|
29565
|
-
onChange:
|
|
29566
|
-
|
|
29567
|
-
|
|
29568
|
-
|
|
29569
|
-
|
|
29570
|
-
|
|
29571
|
-
}
|
|
29572
|
-
value: "quadratic"
|
|
29573
|
-
|
|
29574
|
-
|
|
29575
|
-
|
|
29576
|
-
|
|
29577
|
-
}
|
|
29578
|
-
value: "
|
|
29579
|
-
|
|
29580
|
-
|
|
29581
|
-
|
|
29582
|
-
|
|
29583
|
-
}
|
|
29584
|
-
value: "
|
|
29585
|
-
|
|
29586
|
-
|
|
29587
|
-
|
|
29588
|
-
|
|
29589
|
-
},
|
|
29578
|
+
return /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
29579
|
+
selectedValue: props.graphType,
|
|
29580
|
+
onChange: props.onChange,
|
|
29581
|
+
placeholder: "Select a graph type",
|
|
29582
|
+
style: styles$e.singleSelectShort
|
|
29583
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29584
|
+
value: "linear",
|
|
29585
|
+
label: "Linear function"
|
|
29586
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29587
|
+
value: "quadratic",
|
|
29588
|
+
label: "Quadratic function"
|
|
29589
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29590
|
+
value: "sinusoid",
|
|
29591
|
+
label: "Sinusoid function"
|
|
29592
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29593
|
+
value: "circle",
|
|
29594
|
+
label: "Circle"
|
|
29595
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29596
|
+
value: "point",
|
|
29597
|
+
label: "Point(s)"
|
|
29598
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29599
|
+
value: "linear-system",
|
|
29600
|
+
label: "Linear System"
|
|
29601
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29602
|
+
value: "polygon",
|
|
29603
|
+
label: "Polygon"
|
|
29604
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29605
|
+
value: "segment",
|
|
29606
|
+
label: "Line Segment(s)"
|
|
29607
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29608
|
+
value: "ray",
|
|
29609
|
+
label: "Ray"
|
|
29610
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
29611
|
+
value: "angle",
|
|
29612
|
+
label: "Angle"
|
|
29613
|
+
}));
|
|
29590
29614
|
};
|
|
29615
|
+
const styles$e = aphrodite.StyleSheet.create({
|
|
29616
|
+
singleSelectShort: {
|
|
29617
|
+
// Non-standard spacing, but it's the smallest we can go
|
|
29618
|
+
// without running into styling issues with the dropdown.
|
|
29619
|
+
height: 26
|
|
29620
|
+
}
|
|
29621
|
+
});
|
|
29622
|
+
|
|
29623
|
+
// Renders the given children in a View laid out horizontally.
|
|
29624
|
+
const LabeledRow = props => {
|
|
29625
|
+
const {
|
|
29626
|
+
children,
|
|
29627
|
+
label,
|
|
29628
|
+
labelSide = "left",
|
|
29629
|
+
style
|
|
29630
|
+
} = props;
|
|
29631
|
+
return /*#__PURE__*/React__namespace.createElement("label", null, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
29632
|
+
style: [styles$d.row, style]
|
|
29633
|
+
}, labelSide === "start" || /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
|
|
29634
|
+
style: styles$d.spaceEnd
|
|
29635
|
+
}, label), children, labelSide === "end" && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
|
|
29636
|
+
style: styles$d.spaceStart
|
|
29637
|
+
}, label)));
|
|
29638
|
+
};
|
|
29639
|
+
const styles$d = aphrodite.StyleSheet.create({
|
|
29640
|
+
row: {
|
|
29641
|
+
flexDirection: "row",
|
|
29642
|
+
marginTop: wonderBlocksTokens.spacing.xSmall_8,
|
|
29643
|
+
alignItems: "center"
|
|
29644
|
+
},
|
|
29645
|
+
spaceStart: {
|
|
29646
|
+
marginInlineStart: wonderBlocksTokens.spacing.xSmall_8
|
|
29647
|
+
},
|
|
29648
|
+
spaceEnd: {
|
|
29649
|
+
marginInlineEnd: wonderBlocksTokens.spacing.xSmall_8
|
|
29650
|
+
}
|
|
29651
|
+
});
|
|
29591
29652
|
|
|
29592
29653
|
/* eslint-disable react/forbid-prop-types, react/no-unsafe */
|
|
29593
29654
|
const {
|
|
@@ -29908,75 +29969,70 @@ class InteractiveGraphSettings extends React__namespace.Component {
|
|
|
29908
29969
|
className: "perseus-widget-row"
|
|
29909
29970
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
29910
29971
|
className: "perseus-widget-left-col"
|
|
29911
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
29912
|
-
|
|
29913
|
-
},
|
|
29914
|
-
id: "labels-x",
|
|
29972
|
+
}, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
29973
|
+
label: "x Label"
|
|
29974
|
+
}, /*#__PURE__*/React__namespace.createElement("input", {
|
|
29915
29975
|
type: "text",
|
|
29916
29976
|
className: "graph-settings-axis-label",
|
|
29917
29977
|
ref: this.labelXRef,
|
|
29918
29978
|
onChange: e => this.changeLabel(0, e),
|
|
29919
29979
|
value: this.state.labelsTextbox[0] || ""
|
|
29920
|
-
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29980
|
+
}))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29921
29981
|
className: "perseus-widget-right-col"
|
|
29922
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
29923
|
-
|
|
29924
|
-
},
|
|
29925
|
-
id: "labels-y",
|
|
29982
|
+
}, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
29983
|
+
label: "y Label"
|
|
29984
|
+
}, /*#__PURE__*/React__namespace.createElement("input", {
|
|
29926
29985
|
type: "text",
|
|
29927
29986
|
className: "graph-settings-axis-label",
|
|
29928
29987
|
ref: this.labelYRef,
|
|
29929
29988
|
onChange: e => this.changeLabel(1, e),
|
|
29930
29989
|
value: this.state.labelsTextbox[1] || ""
|
|
29931
|
-
}))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29990
|
+
})))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29932
29991
|
className: "perseus-widget-row"
|
|
29933
29992
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
29934
29993
|
className: "perseus-widget-left-col"
|
|
29935
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
29936
|
-
|
|
29937
|
-
},
|
|
29938
|
-
id: "range-x",
|
|
29994
|
+
}, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
29995
|
+
label: "x Range"
|
|
29996
|
+
}, /*#__PURE__*/React__namespace.createElement(RangeInput$4, {
|
|
29939
29997
|
value: this.state.rangeTextbox[0],
|
|
29940
29998
|
onChange: vals => this.changeRange(0, vals)
|
|
29941
|
-
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29999
|
+
}))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29942
30000
|
className: "perseus-widget-right-col"
|
|
29943
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
29944
|
-
|
|
29945
|
-
},
|
|
29946
|
-
id: "range-y",
|
|
30001
|
+
}, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30002
|
+
label: "y Range"
|
|
30003
|
+
}, /*#__PURE__*/React__namespace.createElement(RangeInput$4, {
|
|
29947
30004
|
value: this.state.rangeTextbox[1],
|
|
29948
30005
|
onChange: vals => this.changeRange(1, vals)
|
|
29949
|
-
}))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
30006
|
+
})))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29950
30007
|
className: "perseus-widget-row"
|
|
29951
30008
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
29952
30009
|
className: "perseus-widget-left-col"
|
|
29953
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
29954
|
-
|
|
29955
|
-
},
|
|
29956
|
-
id: "tick-step",
|
|
30010
|
+
}, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30011
|
+
label: "Tick Step"
|
|
30012
|
+
}, /*#__PURE__*/React__namespace.createElement(RangeInput$4, {
|
|
29957
30013
|
value: this.state.stepTextbox,
|
|
29958
30014
|
onChange: this.changeStep
|
|
29959
|
-
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
30015
|
+
}))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29960
30016
|
className: "perseus-widget-right-col"
|
|
29961
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
29962
|
-
|
|
29963
|
-
},
|
|
29964
|
-
id: "grid-step",
|
|
30017
|
+
}, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30018
|
+
label: "Grid Step"
|
|
30019
|
+
}, /*#__PURE__*/React__namespace.createElement(RangeInput$4, {
|
|
29965
30020
|
value: this.state.gridStepTextbox,
|
|
29966
30021
|
onChange: this.changeGridStep
|
|
29967
|
-
}))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
30022
|
+
})))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29968
30023
|
className: "perseus-widget-row"
|
|
29969
30024
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
29970
30025
|
className: "perseus-widget-left-col"
|
|
29971
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
29972
|
-
|
|
29973
|
-
},
|
|
29974
|
-
id: "snap-step",
|
|
30026
|
+
}, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30027
|
+
label: "Snap Step"
|
|
30028
|
+
}, /*#__PURE__*/React__namespace.createElement(RangeInput$4, {
|
|
29975
30029
|
value: this.state.snapStepTextbox,
|
|
29976
30030
|
onChange: this.changeSnapStep
|
|
29977
|
-
}))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
30031
|
+
})))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29978
30032
|
className: "perseus-widget-row"
|
|
29979
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
30033
|
+
}, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30034
|
+
label: "Markings:"
|
|
30035
|
+
}, /*#__PURE__*/React__namespace.createElement(ButtonGroup$2, {
|
|
29980
30036
|
value: this.props.markings,
|
|
29981
30037
|
allowEmpty: false,
|
|
29982
30038
|
buttons: [{
|
|
@@ -29990,24 +30046,25 @@ class InteractiveGraphSettings extends React__namespace.Component {
|
|
|
29990
30046
|
content: "None"
|
|
29991
30047
|
}],
|
|
29992
30048
|
onChange: this.change("markings")
|
|
29993
|
-
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
30049
|
+
}))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29994
30050
|
className: "perseus-widget-left-col"
|
|
29995
30051
|
}, /*#__PURE__*/React__namespace.createElement(PropCheckBox$7, {
|
|
29996
30052
|
label: "Show tooltips",
|
|
29997
30053
|
showTooltips: this.props.showTooltips,
|
|
29998
30054
|
onChange: this.change
|
|
29999
|
-
}))), /*#__PURE__*/React__namespace.createElement(
|
|
30000
|
-
|
|
30001
|
-
|
|
30002
|
-
|
|
30003
|
-
}, "Url:"), /*#__PURE__*/React__namespace.createElement("input", {
|
|
30004
|
-
id: "bg-url",
|
|
30055
|
+
}))), /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30056
|
+
label: "Background image URL:",
|
|
30057
|
+
style: styles$c.resetSpaceTop
|
|
30058
|
+
}, /*#__PURE__*/React__namespace.createElement("input", {
|
|
30005
30059
|
type: "text",
|
|
30006
|
-
className:
|
|
30060
|
+
className: aphrodite.css(styles$c.backgroundUrlInput),
|
|
30007
30061
|
ref: this.bgUrlRef,
|
|
30008
30062
|
value: this.state.backgroundImage.url || "",
|
|
30009
30063
|
onChange: e => {
|
|
30010
|
-
|
|
30064
|
+
// Shallow-copied clone
|
|
30065
|
+
const image = {
|
|
30066
|
+
...this.props.backgroundImage
|
|
30067
|
+
};
|
|
30011
30068
|
image.url = e.target.value;
|
|
30012
30069
|
this.setState({
|
|
30013
30070
|
backgroundImage: image
|
|
@@ -30015,60 +30072,143 @@ class InteractiveGraphSettings extends React__namespace.Component {
|
|
|
30015
30072
|
},
|
|
30016
30073
|
onKeyPress: this.changeBackgroundUrl,
|
|
30017
30074
|
onBlur: this.changeBackgroundUrl
|
|
30018
|
-
}), /*#__PURE__*/React__namespace.createElement(InfoTip$c, null, /*#__PURE__*/React__namespace.createElement("p", null, "Create an image in graphie, or use the \"Add image\" function to create a background.")))
|
|
30019
|
-
|
|
30020
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
30021
|
-
|
|
30022
|
-
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
30023
|
-
className: "perseus-widget-left-col"
|
|
30075
|
+
}), /*#__PURE__*/React__namespace.createElement(InfoTip$c, null, /*#__PURE__*/React__namespace.createElement("p", null, "Create an image in graphie, or use the \"Add image\" function to create a background."))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30076
|
+
style: styles$c.rulerSection
|
|
30077
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30078
|
+
style: styles$c.checkboxRow
|
|
30024
30079
|
}, /*#__PURE__*/React__namespace.createElement(PropCheckBox$7, {
|
|
30025
30080
|
label: "Show ruler",
|
|
30026
30081
|
showRuler: this.props.showRuler,
|
|
30027
|
-
onChange: this.change
|
|
30028
|
-
|
|
30029
|
-
|
|
30030
|
-
}, /*#__PURE__*/React__namespace.createElement(PropCheckBox$7, {
|
|
30082
|
+
onChange: this.change,
|
|
30083
|
+
style: styles$c.resetSpaceTop
|
|
30084
|
+
}), /*#__PURE__*/React__namespace.createElement(PropCheckBox$7, {
|
|
30031
30085
|
label: "Show protractor",
|
|
30032
30086
|
showProtractor: this.props.showProtractor,
|
|
30033
|
-
onChange: this.change
|
|
30034
|
-
|
|
30035
|
-
|
|
30036
|
-
|
|
30037
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
30038
|
-
|
|
30039
|
-
|
|
30040
|
-
|
|
30041
|
-
|
|
30042
|
-
|
|
30043
|
-
|
|
30044
|
-
|
|
30045
|
-
|
|
30046
|
-
|
|
30047
|
-
|
|
30048
|
-
|
|
30049
|
-
|
|
30050
|
-
|
|
30087
|
+
onChange: this.change,
|
|
30088
|
+
style: styles$c.resetSpaceTop
|
|
30089
|
+
})), this.props.showRuler && /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30090
|
+
style: styles$c.spaceTop
|
|
30091
|
+
}, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30092
|
+
label: "Ruler label:",
|
|
30093
|
+
style: styles$c.resetSpaceTop
|
|
30094
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
30095
|
+
id: "ruler-label-select",
|
|
30096
|
+
selectedValue: this.props.rulerLabel,
|
|
30097
|
+
onChange: newValue => {
|
|
30098
|
+
this.change({
|
|
30099
|
+
rulerLabel: newValue
|
|
30100
|
+
});
|
|
30101
|
+
},
|
|
30102
|
+
placeholder: "None",
|
|
30103
|
+
style: styles$c.singleSelectShort
|
|
30104
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30105
|
+
value: "",
|
|
30106
|
+
label: "None",
|
|
30107
|
+
horizontalRule: "full-width"
|
|
30108
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30109
|
+
value: "mm",
|
|
30110
|
+
label: "Milimeters"
|
|
30111
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30112
|
+
value: "cm",
|
|
30113
|
+
label: "Centimeters"
|
|
30114
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30115
|
+
value: "m",
|
|
30116
|
+
label: "Meters"
|
|
30117
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30118
|
+
value: "km",
|
|
30119
|
+
label: "Kilometers",
|
|
30120
|
+
horizontalRule: "full-width"
|
|
30121
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30122
|
+
value: "in",
|
|
30123
|
+
label: "Inches"
|
|
30124
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30125
|
+
value: "ft",
|
|
30126
|
+
label: "Feet"
|
|
30127
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30128
|
+
value: "yd",
|
|
30129
|
+
label: "Yards"
|
|
30130
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30131
|
+
value: "mi",
|
|
30132
|
+
label: "Miles"
|
|
30133
|
+
}))), /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30134
|
+
label: "Ruler ticks:"
|
|
30135
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
30136
|
+
id: "ruler-ticks-select",
|
|
30137
|
+
selectedValue: `${this.props.rulerTicks}`,
|
|
30138
|
+
onChange: newValue => {
|
|
30139
|
+
this.change({
|
|
30140
|
+
rulerTicks: newValue
|
|
30141
|
+
});
|
|
30142
|
+
},
|
|
30143
|
+
placeholder: "10",
|
|
30144
|
+
style: styles$c.singleSelectShort
|
|
30145
|
+
}, [1, 2, 4, 8, 10, 16].map(value => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30146
|
+
key: value,
|
|
30147
|
+
value: `${value}`,
|
|
30148
|
+
label: `${value}`
|
|
30051
30149
|
})))))));
|
|
30052
30150
|
}
|
|
30053
30151
|
}
|
|
30152
|
+
const styles$c = aphrodite.StyleSheet.create({
|
|
30153
|
+
resetSpaceTop: {
|
|
30154
|
+
marginTop: 0
|
|
30155
|
+
},
|
|
30156
|
+
spaceTop: {
|
|
30157
|
+
marginTop: wonderBlocksTokens.spacing.xSmall_8
|
|
30158
|
+
},
|
|
30159
|
+
singleSelectShort: {
|
|
30160
|
+
// Non-standard spacing, but it's the smallest we can go
|
|
30161
|
+
// without running into styling issues with the dropdown.
|
|
30162
|
+
height: 26
|
|
30163
|
+
},
|
|
30164
|
+
backgroundUrlInput: {
|
|
30165
|
+
border: `1px solid ${wonderBlocksTokens.color.offBlack32}`,
|
|
30166
|
+
borderRadius: wonderBlocksTokens.spacing.xxxSmall_4,
|
|
30167
|
+
padding: wonderBlocksTokens.spacing.xxxSmall_4
|
|
30168
|
+
},
|
|
30169
|
+
checkboxRow: {
|
|
30170
|
+
flexDirection: "row",
|
|
30171
|
+
alignItems: "center",
|
|
30172
|
+
justifyContent: "space-between"
|
|
30173
|
+
},
|
|
30174
|
+
rulerSection: {
|
|
30175
|
+
marginTop: wonderBlocksTokens.spacing.xSmall_8,
|
|
30176
|
+
borderTop: `1px solid ${wonderBlocksTokens.color.offBlack16}`,
|
|
30177
|
+
paddingTop: wonderBlocksTokens.spacing.xSmall_8,
|
|
30178
|
+
paddingBottom: wonderBlocksTokens.spacing.xSmall_8,
|
|
30179
|
+
borderBottom: `1px solid ${wonderBlocksTokens.color.offBlack16}`
|
|
30180
|
+
}
|
|
30181
|
+
});
|
|
30054
30182
|
|
|
30055
30183
|
const SegmentCountSelector = _ref => {
|
|
30056
30184
|
let {
|
|
30057
30185
|
numSegments = 1,
|
|
30058
30186
|
onChange
|
|
30059
30187
|
} = _ref;
|
|
30060
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
30188
|
+
return /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
30061
30189
|
key: "segment-select",
|
|
30062
|
-
|
|
30063
|
-
|
|
30064
|
-
|
|
30190
|
+
selectedValue: `${numSegments}`
|
|
30191
|
+
// Never uses placeholder, always has value
|
|
30192
|
+
,
|
|
30193
|
+
placeholder: "",
|
|
30194
|
+
onChange: newValue => {
|
|
30195
|
+
const num = +newValue;
|
|
30065
30196
|
onChange(num);
|
|
30066
|
-
}
|
|
30067
|
-
|
|
30197
|
+
},
|
|
30198
|
+
style: styles$b.singleSelectShort
|
|
30199
|
+
}, ___default["default"].range(1, 7).map(n => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30068
30200
|
key: n,
|
|
30069
|
-
value: n
|
|
30070
|
-
|
|
30201
|
+
value: `${n}`,
|
|
30202
|
+
label: `${n} segment${n > 1 ? "s" : ""}`
|
|
30203
|
+
})));
|
|
30071
30204
|
};
|
|
30205
|
+
const styles$b = aphrodite.StyleSheet.create({
|
|
30206
|
+
singleSelectShort: {
|
|
30207
|
+
// Non-standard spacing, but it's the smallest we can go
|
|
30208
|
+
// without running into styling issues with the dropdown.
|
|
30209
|
+
height: 26
|
|
30210
|
+
}
|
|
30211
|
+
});
|
|
30072
30212
|
|
|
30073
30213
|
const {
|
|
30074
30214
|
InfoTip: InfoTip$b
|
|
@@ -30089,27 +30229,13 @@ const deprecatedProps = {
|
|
|
30089
30229
|
};
|
|
30090
30230
|
}
|
|
30091
30231
|
};
|
|
30092
|
-
|
|
30093
|
-
|
|
30094
|
-
|
|
30095
|
-
|
|
30096
|
-
|
|
30097
|
-
}
|
|
30098
|
-
|
|
30099
|
-
style: {
|
|
30100
|
-
...style,
|
|
30101
|
-
flexDirection: "row",
|
|
30102
|
-
marginTop: Spacing__default["default"].xSmall_8
|
|
30103
|
-
}
|
|
30104
|
-
}, children);
|
|
30105
|
-
};
|
|
30106
|
-
const FieldLabel = props => {
|
|
30107
|
-
return /*#__PURE__*/React__namespace.createElement(Typography__namespace.LabelSmall, {
|
|
30108
|
-
style: {
|
|
30109
|
-
marginRight: Spacing__default["default"].xSmall_8
|
|
30110
|
-
}
|
|
30111
|
-
}, props.children);
|
|
30112
|
-
};
|
|
30232
|
+
const POLYGON_SIDES = ___default["default"].map(___default["default"].range(3, 13), function (value) {
|
|
30233
|
+
return /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30234
|
+
key: `polygon-sides-${value}`,
|
|
30235
|
+
value: `${value}`,
|
|
30236
|
+
label: `${value} sides`
|
|
30237
|
+
});
|
|
30238
|
+
});
|
|
30113
30239
|
/**
|
|
30114
30240
|
* An editor for the InteractiveGraph widget, which allows the user to
|
|
30115
30241
|
* specify the graph's properties and the correct answer.
|
|
@@ -30199,7 +30325,9 @@ class InteractiveGraphEditor extends React__namespace.Component {
|
|
|
30199
30325
|
className: "perseus-error"
|
|
30200
30326
|
}, this.props.valid);
|
|
30201
30327
|
}
|
|
30202
|
-
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, /*#__PURE__*/React__namespace.createElement(
|
|
30328
|
+
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30329
|
+
label: "Type of Graph:"
|
|
30330
|
+
}, /*#__PURE__*/React__namespace.createElement(GraphTypeSelector, {
|
|
30203
30331
|
graphType: this.props.graph?.type ?? InteractiveGraph.defaultProps.graph.type,
|
|
30204
30332
|
onChange: type => {
|
|
30205
30333
|
this.props.onChange({
|
|
@@ -30211,7 +30339,9 @@ class InteractiveGraphEditor extends React__namespace.Component {
|
|
|
30211
30339
|
}
|
|
30212
30340
|
});
|
|
30213
30341
|
}
|
|
30214
|
-
})), this.props.correct?.type === "point" && /*#__PURE__*/React__namespace.createElement(
|
|
30342
|
+
})), this.props.correct?.type === "point" && /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30343
|
+
label: "Number of Points:"
|
|
30344
|
+
}, /*#__PURE__*/React__namespace.createElement(GraphPointsCountSelector, {
|
|
30215
30345
|
numPoints: this.props.correct?.numPoints,
|
|
30216
30346
|
onChange: points => {
|
|
30217
30347
|
this.props.onChange({
|
|
@@ -30221,13 +30351,16 @@ class InteractiveGraphEditor extends React__namespace.Component {
|
|
|
30221
30351
|
}
|
|
30222
30352
|
});
|
|
30223
30353
|
}
|
|
30224
|
-
})), this.props.correct?.type === "polygon" && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(
|
|
30354
|
+
})), this.props.correct?.type === "polygon" && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30355
|
+
label: "Number of sides:"
|
|
30356
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
30225
30357
|
key: "polygon-select",
|
|
30226
|
-
|
|
30227
|
-
|
|
30358
|
+
selectedValue: this.props.correct?.numSides ? `${this.props.correct.numSides}` : "3",
|
|
30359
|
+
placeholder: "",
|
|
30360
|
+
onChange: newValue => {
|
|
30228
30361
|
const graph = {
|
|
30229
30362
|
...this.props.correct,
|
|
30230
|
-
numSides: parsePointCount(
|
|
30363
|
+
numSides: parsePointCount(newValue),
|
|
30231
30364
|
coords: null,
|
|
30232
30365
|
// reset the snap for UNLIMITED, which
|
|
30233
30366
|
// only supports "grid"
|
|
@@ -30237,38 +30370,45 @@ class InteractiveGraphEditor extends React__namespace.Component {
|
|
|
30237
30370
|
this.props.onChange({
|
|
30238
30371
|
correct: graph
|
|
30239
30372
|
});
|
|
30240
|
-
}
|
|
30241
|
-
|
|
30242
|
-
|
|
30243
|
-
|
|
30244
|
-
|
|
30245
|
-
|
|
30246
|
-
|
|
30247
|
-
|
|
30248
|
-
|
|
30249
|
-
|
|
30250
|
-
|
|
30251
|
-
|
|
30373
|
+
},
|
|
30374
|
+
style: styles$a.singleSelectShort
|
|
30375
|
+
}, [...POLYGON_SIDES, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30376
|
+
value: "unlimited",
|
|
30377
|
+
label: "unlimited sides"
|
|
30378
|
+
})])), /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30379
|
+
label: "Snap to:"
|
|
30380
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
30381
|
+
selectedValue: this.props.correct?.snapTo || "grid"
|
|
30382
|
+
// Never uses placeholder, always has value
|
|
30383
|
+
,
|
|
30384
|
+
placeholder: "",
|
|
30385
|
+
onChange: newValue => {
|
|
30252
30386
|
const graph = {
|
|
30253
30387
|
...this.props.correct,
|
|
30254
|
-
snapTo:
|
|
30388
|
+
snapTo: newValue,
|
|
30255
30389
|
coords: null
|
|
30256
30390
|
};
|
|
30257
30391
|
this.props.onChange({
|
|
30258
30392
|
correct: graph
|
|
30259
30393
|
});
|
|
30260
|
-
}
|
|
30261
|
-
|
|
30262
|
-
|
|
30263
|
-
|
|
30264
|
-
|
|
30265
|
-
},
|
|
30266
|
-
value: "
|
|
30267
|
-
|
|
30268
|
-
|
|
30269
|
-
|
|
30270
|
-
|
|
30271
|
-
|
|
30394
|
+
},
|
|
30395
|
+
style: styles$a.singleSelectShort
|
|
30396
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30397
|
+
value: "grid",
|
|
30398
|
+
label: "grid"
|
|
30399
|
+
}), this.props.correct?.numSides !== "unlimited" && /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30400
|
+
value: "angles",
|
|
30401
|
+
label: "interior angles"
|
|
30402
|
+
}), this.props.correct?.numSides !== "unlimited" && /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30403
|
+
value: "sides",
|
|
30404
|
+
label: "side measures"
|
|
30405
|
+
})), /*#__PURE__*/React__namespace.createElement(InfoTip$b, null, /*#__PURE__*/React__namespace.createElement("p", null, "These options affect the movement of the vertex points. The grid option will guide the points to the nearest half step along the grid."), /*#__PURE__*/React__namespace.createElement("p", null, "The interior angle and side measure options guide the points to the nearest whole angle or side"), " ", "measure respectively.")), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30406
|
+
style: styles$a.row
|
|
30407
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
|
|
30408
|
+
label: /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, null, "Show angle measures"),
|
|
30409
|
+
checked:
|
|
30410
|
+
// Don't show indeterminate checkbox state
|
|
30411
|
+
!!this.props.correct?.showAngles,
|
|
30272
30412
|
onChange: () => {
|
|
30273
30413
|
this.props.onChange({
|
|
30274
30414
|
correct: {
|
|
@@ -30277,11 +30417,13 @@ class InteractiveGraphEditor extends React__namespace.Component {
|
|
|
30277
30417
|
}
|
|
30278
30418
|
});
|
|
30279
30419
|
}
|
|
30280
|
-
})
|
|
30281
|
-
|
|
30282
|
-
},
|
|
30283
|
-
|
|
30284
|
-
checked:
|
|
30420
|
+
}), /*#__PURE__*/React__namespace.createElement(InfoTip$b, null, /*#__PURE__*/React__namespace.createElement("p", null, "Displays the interior angle measures."))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30421
|
+
style: styles$a.row
|
|
30422
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
|
|
30423
|
+
label: /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, null, "Show side measures"),
|
|
30424
|
+
checked:
|
|
30425
|
+
// Don't show indeterminate checkbox state
|
|
30426
|
+
!!this.props.correct?.showSides,
|
|
30285
30427
|
onChange: () => {
|
|
30286
30428
|
this.props.onChange({
|
|
30287
30429
|
correct: {
|
|
@@ -30290,7 +30432,9 @@ class InteractiveGraphEditor extends React__namespace.Component {
|
|
|
30290
30432
|
}
|
|
30291
30433
|
});
|
|
30292
30434
|
}
|
|
30293
|
-
})
|
|
30435
|
+
}), /*#__PURE__*/React__namespace.createElement(InfoTip$b, null, /*#__PURE__*/React__namespace.createElement("p", null, "Displays the side lengths.")))), this.props.correct?.type === "segment" && /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30436
|
+
label: "Number of segments:"
|
|
30437
|
+
}, /*#__PURE__*/React__namespace.createElement(SegmentCountSelector, {
|
|
30294
30438
|
numSegments: this.props.correct?.numSegments,
|
|
30295
30439
|
onChange: sides => {
|
|
30296
30440
|
this.props.onChange({
|
|
@@ -30301,16 +30445,7 @@ class InteractiveGraphEditor extends React__namespace.Component {
|
|
|
30301
30445
|
}
|
|
30302
30446
|
});
|
|
30303
30447
|
}
|
|
30304
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
30305
|
-
style: {
|
|
30306
|
-
fontSize: 12,
|
|
30307
|
-
backgroundColor: "#eee",
|
|
30308
|
-
paddingInline: Spacing__default["default"].xxSmall_6,
|
|
30309
|
-
borderColor: "#ccc",
|
|
30310
|
-
borderStyle: "solid",
|
|
30311
|
-
borderWidth: 1
|
|
30312
|
-
}
|
|
30313
|
-
}, equationString), /*#__PURE__*/React__namespace.createElement(InfoTip$b, null, /*#__PURE__*/React__namespace.createElement("p", null, "Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."))), /*#__PURE__*/React__namespace.createElement(InteractiveGraphSettings, {
|
|
30448
|
+
})), /*#__PURE__*/React__namespace.createElement(InteractiveGraphSettings, {
|
|
30314
30449
|
box: getInteractiveBoxFromSizeClass(sizeClass),
|
|
30315
30450
|
range: this.props.range,
|
|
30316
30451
|
labels: this.props.labels,
|
|
@@ -30326,38 +30461,64 @@ class InteractiveGraphEditor extends React__namespace.Component {
|
|
|
30326
30461
|
rulerLabel: this.props.rulerLabel,
|
|
30327
30462
|
rulerTicks: this.props.rulerTicks,
|
|
30328
30463
|
onChange: this.props.onChange
|
|
30329
|
-
}), this.props.correct.type === "polygon" && /*#__PURE__*/React__namespace.createElement(
|
|
30330
|
-
|
|
30331
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
30332
|
-
|
|
30464
|
+
}), this.props.correct.type === "polygon" && /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30465
|
+
label: "Student answer must"
|
|
30466
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
30467
|
+
selectedValue: this.props.correct.match || "exact",
|
|
30333
30468
|
onChange: this.changeMatchType
|
|
30334
|
-
|
|
30335
|
-
|
|
30336
|
-
|
|
30337
|
-
|
|
30338
|
-
},
|
|
30339
|
-
value: "
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
30345
|
-
value:
|
|
30469
|
+
// Never uses placeholder, always has value
|
|
30470
|
+
,
|
|
30471
|
+
placeholder: "",
|
|
30472
|
+
style: styles$a.singleSelectShort
|
|
30473
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30474
|
+
value: "exact",
|
|
30475
|
+
label: "match exactly"
|
|
30476
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30477
|
+
value: "congruent",
|
|
30478
|
+
label: "be congruent"
|
|
30479
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30480
|
+
value: "approx",
|
|
30481
|
+
label: "be approximately congruent"
|
|
30482
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30483
|
+
value: "similar",
|
|
30484
|
+
label: "be similar"
|
|
30485
|
+
})), /*#__PURE__*/React__namespace.createElement(InfoTip$b, null, /*#__PURE__*/React__namespace.createElement("ul", null, /*#__PURE__*/React__namespace.createElement("li", null, /*#__PURE__*/React__namespace.createElement("p", null, /*#__PURE__*/React__namespace.createElement("b", null, "Match Exactly:"), " Match exactly in size, orientation, and location on the grid even if it is not shown in the background.")), /*#__PURE__*/React__namespace.createElement("li", null, /*#__PURE__*/React__namespace.createElement("p", null, /*#__PURE__*/React__namespace.createElement("b", null, "Be Congruent:"), " Be congruent in size and shape, but can be located anywhere on the grid.")), /*#__PURE__*/React__namespace.createElement("li", null, /*#__PURE__*/React__namespace.createElement("p", null, /*#__PURE__*/React__namespace.createElement("b", null, "Be Approximately Congruent:"), " Be exactly similar, and congruent in size and shape to within 0.1 units, but can be located anywhere on the grid.", " ", /*#__PURE__*/React__namespace.createElement("em", null, "Use this with snapping to angle measure."))), /*#__PURE__*/React__namespace.createElement("li", null, /*#__PURE__*/React__namespace.createElement("p", null, /*#__PURE__*/React__namespace.createElement("b", null, "Be Similar:"), " Be similar with matching interior angles, and side measures that are matching or a multiple of the correct side measures. The figure can be located anywhere on the grid."))))), this.props.correct.type === "angle" && /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30486
|
+
label: "Student answer must"
|
|
30487
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
30488
|
+
selectedValue: this.props.correct.match || "exact",
|
|
30346
30489
|
onChange: this.changeMatchType
|
|
30347
|
-
|
|
30348
|
-
|
|
30349
|
-
|
|
30350
|
-
|
|
30351
|
-
},
|
|
30352
|
-
|
|
30353
|
-
|
|
30354
|
-
|
|
30355
|
-
|
|
30356
|
-
|
|
30490
|
+
// Never uses placeholder, always has value
|
|
30491
|
+
,
|
|
30492
|
+
placeholder: "",
|
|
30493
|
+
style: styles$a.singleSelectShort
|
|
30494
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30495
|
+
value: "exact",
|
|
30496
|
+
label: "match exactly"
|
|
30497
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
30498
|
+
value: "congruent",
|
|
30499
|
+
label: "be congruent"
|
|
30500
|
+
})), /*#__PURE__*/React__namespace.createElement(InfoTip$b, null, /*#__PURE__*/React__namespace.createElement("p", null, "Congruency requires only that the angle measures are the same. An exact match implies congruency, but also requires that the angles have the same orientation and that the vertices are in the same position."))), /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
30501
|
+
label: "Correct answer:"
|
|
30502
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.BodyMonospace, {
|
|
30503
|
+
style: {
|
|
30504
|
+
fontSize: 12,
|
|
30505
|
+
backgroundColor: "#eee",
|
|
30506
|
+
paddingInline: Spacing__default["default"].xxSmall_6,
|
|
30507
|
+
borderColor: "#ccc",
|
|
30508
|
+
borderStyle: "solid",
|
|
30509
|
+
borderWidth: 1
|
|
30510
|
+
}
|
|
30511
|
+
}, equationString), /*#__PURE__*/React__namespace.createElement(InfoTip$b, null, /*#__PURE__*/React__namespace.createElement("p", null, "Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."))), graph);
|
|
30512
|
+
}
|
|
30513
|
+
changeMatchType = newValue => {
|
|
30514
|
+
const correct = {
|
|
30515
|
+
...this.props.correct,
|
|
30516
|
+
match: newValue
|
|
30517
|
+
};
|
|
30357
30518
|
this.props.onChange({
|
|
30358
30519
|
correct: correct
|
|
30359
30520
|
});
|
|
30360
|
-
}
|
|
30521
|
+
};
|
|
30361
30522
|
serialize() {
|
|
30362
30523
|
const json = ___default["default"].pick(this.props, "step", "backgroundImage", "markings", "labels", "showProtractor", "showRuler", "showTooltips", "rulerLabel", "rulerTicks", "range", "gridStep", "snapStep");
|
|
30363
30524
|
|
|
@@ -30383,6 +30544,18 @@ class InteractiveGraphEditor extends React__namespace.Component {
|
|
|
30383
30544
|
return json;
|
|
30384
30545
|
}
|
|
30385
30546
|
}
|
|
30547
|
+
const styles$a = aphrodite.StyleSheet.create({
|
|
30548
|
+
singleSelectShort: {
|
|
30549
|
+
// Non-standard spacing, but it's the smallest we can go
|
|
30550
|
+
// without running into styling issues with the dropdown.
|
|
30551
|
+
height: 26
|
|
30552
|
+
},
|
|
30553
|
+
row: {
|
|
30554
|
+
flexDirection: "row",
|
|
30555
|
+
marginTop: Spacing__default["default"].xSmall_8,
|
|
30556
|
+
alignItems: "center"
|
|
30557
|
+
}
|
|
30558
|
+
});
|
|
30386
30559
|
|
|
30387
30560
|
class FormWrappedTextField extends React__namespace.Component {
|
|
30388
30561
|
state = {
|