@khanacademy/perseus-editor 2.7.7 → 2.8.1
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 +27 -0
- package/dist/es/index.js +116 -75
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +117 -75
- package/dist/index.js.map +1 -1
- package/dist/widgets/expression-editor.d.ts +4 -4
- package/package.json +5 -5
- package/src/widgets/expression-editor.tsx +43 -20
- package/src/widgets/interaction/constraint-editor.tsx +8 -6
- package/src/widgets/interaction-editor.tsx +33 -25
- package/tsconfig-build.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -61,7 +61,7 @@ var i18n__namespace = /*#__PURE__*/_interopNamespace(i18n$1);
|
|
|
61
61
|
|
|
62
62
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
63
63
|
const libName = "@khanacademy/perseus-editor";
|
|
64
|
-
const libVersion = "2.
|
|
64
|
+
const libVersion = "2.8.1";
|
|
65
65
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
66
66
|
|
|
67
67
|
function _defineProperty(obj, key, value) {
|
|
@@ -26815,6 +26815,17 @@ const {
|
|
|
26815
26815
|
const {
|
|
26816
26816
|
getDependencies: getDependencies$2
|
|
26817
26817
|
} = perseus.Dependencies;
|
|
26818
|
+
const parseAnswerKey = _ref => {
|
|
26819
|
+
let {
|
|
26820
|
+
key
|
|
26821
|
+
} = _ref;
|
|
26822
|
+
const parsedKey = Number.parseInt(key !== null && key !== void 0 ? key : "");
|
|
26823
|
+
if (Number.isNaN(parsedKey)) {
|
|
26824
|
+
throw new Error("Invalid answer key: ".concat(key));
|
|
26825
|
+
}
|
|
26826
|
+
return parsedKey;
|
|
26827
|
+
};
|
|
26828
|
+
|
|
26818
26829
|
// Pick a key that isn't currently used by an answer in answerForms
|
|
26819
26830
|
const _makeNewKey = answerForms => {
|
|
26820
26831
|
// first note all the currently used keys in an array, used like a map :3
|
|
@@ -26822,7 +26833,7 @@ const _makeNewKey = answerForms => {
|
|
|
26822
26833
|
// be one past the largest key.
|
|
26823
26834
|
const usedKeys = [];
|
|
26824
26835
|
answerForms.forEach(ans => {
|
|
26825
|
-
usedKeys[ans
|
|
26836
|
+
usedKeys[parseAnswerKey(ans)] = true;
|
|
26826
26837
|
});
|
|
26827
26838
|
|
|
26828
26839
|
// then scan through the array to find the first unused (undefined) key
|
|
@@ -26995,7 +27006,8 @@ class ExpressionEditor extends React__namespace.Component {
|
|
|
26995
27006
|
return perseus.Changeable.change.apply(this, args);
|
|
26996
27007
|
}
|
|
26997
27008
|
render() {
|
|
26998
|
-
const answerOptions = this.props.answerForms.map(
|
|
27009
|
+
const answerOptions = this.props.answerForms.map(ans => {
|
|
27010
|
+
const key = parseAnswerKey(ans);
|
|
26999
27011
|
const expressionProps = {
|
|
27000
27012
|
// note we're using
|
|
27001
27013
|
// *this.props*.{times,functions,buttonSets} since each
|
|
@@ -27004,21 +27016,24 @@ class ExpressionEditor extends React__namespace.Component {
|
|
|
27004
27016
|
functions: this.props.functions,
|
|
27005
27017
|
buttonSets: this.props.buttonSets,
|
|
27006
27018
|
buttonsVisible: "focused",
|
|
27007
|
-
form:
|
|
27008
|
-
simplify:
|
|
27009
|
-
value:
|
|
27010
|
-
onChange: props => this.updateForm(
|
|
27019
|
+
form: ans.form,
|
|
27020
|
+
simplify: ans.simplify,
|
|
27021
|
+
value: ans.value,
|
|
27022
|
+
onChange: props => this.updateForm(key, props),
|
|
27011
27023
|
trackInteraction: () => {},
|
|
27012
|
-
widgetId: this.props.widgetId + "-" +
|
|
27024
|
+
widgetId: this.props.widgetId + "-" + ans.key
|
|
27013
27025
|
};
|
|
27014
|
-
return lens(
|
|
27026
|
+
return lens(ans).merge([], {
|
|
27015
27027
|
draggable: true,
|
|
27016
|
-
onChange: props =>
|
|
27017
|
-
|
|
27028
|
+
onChange: props => {
|
|
27029
|
+
var _ans$key;
|
|
27030
|
+
return this.updateForm(Number.parseInt((_ans$key = ans.key) !== null && _ans$key !== void 0 ? _ans$key : ""), props);
|
|
27031
|
+
},
|
|
27032
|
+
onDelete: () => this.handleRemoveForm(key),
|
|
27018
27033
|
expressionProps: expressionProps
|
|
27019
27034
|
}).freeze();
|
|
27020
|
-
}).map(
|
|
27021
|
-
key:
|
|
27035
|
+
}).map(obj => /*#__PURE__*/React__namespace.createElement(AnswerOption, _extends({
|
|
27036
|
+
key: obj.key
|
|
27022
27037
|
}, obj)));
|
|
27023
27038
|
const sortable = /*#__PURE__*/React__namespace.createElement(SortableArea, {
|
|
27024
27039
|
components: answerOptions,
|
|
@@ -28654,6 +28669,9 @@ class ConstraintEditor extends React__namespace.Component {
|
|
|
28654
28669
|
const {
|
|
28655
28670
|
TeX
|
|
28656
28671
|
} = perseus.Dependencies.getDependencies();
|
|
28672
|
+
const analyticsStub = {
|
|
28673
|
+
onAnalyticsEvent: () => Promise.resolve()
|
|
28674
|
+
};
|
|
28657
28675
|
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
28658
28676
|
className: "perseus-widget-row"
|
|
28659
28677
|
}, "Constraint:", " ", /*#__PURE__*/React__namespace.createElement(ButtonGroup$2, {
|
|
@@ -28684,47 +28702,47 @@ class ConstraintEditor extends React__namespace.Component {
|
|
|
28684
28702
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
28685
28703
|
className: "perseus-widget-row"
|
|
28686
28704
|
}, /*#__PURE__*/React__namespace.createElement(TeX, null, "x="), " ", /*#__PURE__*/React__namespace.createElement(MathInput$1, {
|
|
28687
|
-
buttonSets: [],
|
|
28688
28705
|
buttonsVisible: "never",
|
|
28689
28706
|
value: this.props.constraintFn,
|
|
28690
|
-
onChange: this.change("constraintFn")
|
|
28707
|
+
onChange: this.change("constraintFn"),
|
|
28708
|
+
analytics: analyticsStub
|
|
28691
28709
|
}))), this.props.constraint === "y" && /*#__PURE__*/React__namespace.createElement("div", {
|
|
28692
28710
|
className: "graph-settings"
|
|
28693
28711
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
28694
28712
|
className: "perseus-widget-row"
|
|
28695
28713
|
}, /*#__PURE__*/React__namespace.createElement(TeX, null, "y="), " ", /*#__PURE__*/React__namespace.createElement(MathInput$1, {
|
|
28696
|
-
buttonSets: [],
|
|
28697
28714
|
buttonsVisible: "never",
|
|
28698
28715
|
value: this.props.constraintFn,
|
|
28699
|
-
onChange: this.change("constraintFn")
|
|
28716
|
+
onChange: this.change("constraintFn"),
|
|
28717
|
+
analytics: analyticsStub
|
|
28700
28718
|
}))), "Ensure these are set so nothing can be dragged off the canvas:", /*#__PURE__*/React__namespace.createElement("div", {
|
|
28701
28719
|
className: "perseus-widget-row"
|
|
28702
28720
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
28703
28721
|
className: "perseus-widget-row"
|
|
28704
28722
|
}, /*#__PURE__*/React__namespace.createElement(TeX, null, "x \\in \\Large["), " ", /*#__PURE__*/React__namespace.createElement(MathInput$1, {
|
|
28705
|
-
buttonSets: [],
|
|
28706
28723
|
buttonsVisible: "never",
|
|
28707
28724
|
value: this.props.constraintXMin,
|
|
28708
|
-
onChange: this.change("constraintXMin")
|
|
28725
|
+
onChange: this.change("constraintXMin"),
|
|
28726
|
+
analytics: analyticsStub
|
|
28709
28727
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ", "), " ", /*#__PURE__*/React__namespace.createElement(MathInput$1, {
|
|
28710
|
-
buttonSets: [],
|
|
28711
28728
|
buttonsVisible: "never",
|
|
28712
28729
|
value: this.props.constraintXMax,
|
|
28713
|
-
onChange: this.change("constraintXMax")
|
|
28730
|
+
onChange: this.change("constraintXMax"),
|
|
28731
|
+
analytics: analyticsStub
|
|
28714
28732
|
}), " ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large]"))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
28715
28733
|
className: "perseus-widget-row"
|
|
28716
28734
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
28717
28735
|
className: "perseus-widget-row"
|
|
28718
28736
|
}, /*#__PURE__*/React__namespace.createElement(TeX, null, "y \\in \\Large["), " ", /*#__PURE__*/React__namespace.createElement(MathInput$1, {
|
|
28719
|
-
buttonSets: [],
|
|
28720
28737
|
buttonsVisible: "never",
|
|
28721
28738
|
value: this.props.constraintYMin,
|
|
28722
|
-
onChange: this.change("constraintYMin")
|
|
28739
|
+
onChange: this.change("constraintYMin"),
|
|
28740
|
+
analytics: analyticsStub
|
|
28723
28741
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ", "), " ", /*#__PURE__*/React__namespace.createElement(MathInput$1, {
|
|
28724
|
-
buttonSets: [],
|
|
28725
28742
|
buttonsVisible: "never",
|
|
28726
28743
|
value: this.props.constraintYMax,
|
|
28727
|
-
onChange: this.change("constraintYMax")
|
|
28744
|
+
onChange: this.change("constraintYMax"),
|
|
28745
|
+
analytics: analyticsStub
|
|
28728
28746
|
}), " ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large]"))));
|
|
28729
28747
|
}
|
|
28730
28748
|
}
|
|
@@ -28784,24 +28802,27 @@ class PointEditor extends React__namespace.Component {
|
|
|
28784
28802
|
const {
|
|
28785
28803
|
TeX
|
|
28786
28804
|
} = getDependencies();
|
|
28805
|
+
const analyticsStub = {
|
|
28806
|
+
onAnalyticsEvent: () => Promise.resolve()
|
|
28807
|
+
};
|
|
28787
28808
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
28788
28809
|
className: "graph-settings"
|
|
28789
28810
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
28790
28811
|
className: "perseus-widget-row"
|
|
28791
28812
|
}, "Coordinate: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
28792
|
-
buttonSets: [],
|
|
28793
28813
|
buttonsVisible: "never",
|
|
28794
28814
|
value: this.props.coordX
|
|
28795
28815
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
28796
28816
|
,
|
|
28797
|
-
onChange: this.change("coordX")
|
|
28817
|
+
onChange: this.change("coordX"),
|
|
28818
|
+
analytics: analyticsStub
|
|
28798
28819
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
28799
|
-
buttonSets: [],
|
|
28800
28820
|
buttonsVisible: "never",
|
|
28801
28821
|
value: this.props.coordY
|
|
28802
28822
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
28803
28823
|
,
|
|
28804
|
-
onChange: this.change("coordY")
|
|
28824
|
+
onChange: this.change("coordY"),
|
|
28825
|
+
analytics: analyticsStub
|
|
28805
28826
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
28806
28827
|
className: "perseus-widget-row"
|
|
28807
28828
|
}, /*#__PURE__*/React__namespace.createElement(perseus.ColorPicker, {
|
|
@@ -28847,40 +28868,43 @@ class LineEditor extends React__namespace.Component {
|
|
|
28847
28868
|
const {
|
|
28848
28869
|
TeX
|
|
28849
28870
|
} = getDependencies();
|
|
28871
|
+
const analyticsStub = {
|
|
28872
|
+
onAnalyticsEvent: () => Promise.resolve()
|
|
28873
|
+
};
|
|
28850
28874
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
28851
28875
|
className: "graph-settings"
|
|
28852
28876
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
28853
28877
|
className: "perseus-widget-row"
|
|
28854
28878
|
}, "Start: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
28855
|
-
buttonSets: [],
|
|
28856
28879
|
buttonsVisible: "never",
|
|
28857
28880
|
value: this.props.startX
|
|
28858
28881
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
28859
28882
|
,
|
|
28860
|
-
onChange: this.change("startX")
|
|
28883
|
+
onChange: this.change("startX"),
|
|
28884
|
+
analytics: analyticsStub
|
|
28861
28885
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
28862
|
-
buttonSets: [],
|
|
28863
28886
|
buttonsVisible: "never",
|
|
28864
28887
|
value: this.props.startY
|
|
28865
28888
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
28866
28889
|
,
|
|
28867
|
-
onChange: this.change("startY")
|
|
28890
|
+
onChange: this.change("startY"),
|
|
28891
|
+
analytics: analyticsStub
|
|
28868
28892
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
28869
28893
|
className: "perseus-widget-row"
|
|
28870
28894
|
}, "End: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
28871
|
-
buttonSets: [],
|
|
28872
28895
|
buttonsVisible: "never",
|
|
28873
28896
|
value: this.props.endX
|
|
28874
28897
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
28875
28898
|
,
|
|
28876
|
-
onChange: this.change("endX")
|
|
28899
|
+
onChange: this.change("endX"),
|
|
28900
|
+
analytics: analyticsStub
|
|
28877
28901
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
28878
|
-
buttonSets: [],
|
|
28879
28902
|
buttonsVisible: "never",
|
|
28880
28903
|
value: this.props.endY
|
|
28881
28904
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
28882
28905
|
,
|
|
28883
|
-
onChange: this.change("endY")
|
|
28906
|
+
onChange: this.change("endY"),
|
|
28907
|
+
analytics: analyticsStub
|
|
28884
28908
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
28885
28909
|
className: "perseus-widget-row"
|
|
28886
28910
|
}, /*#__PURE__*/React__namespace.createElement(perseus.ColorPicker, {
|
|
@@ -28959,20 +28983,23 @@ class MovablePointEditor extends React__namespace.Component {
|
|
|
28959
28983
|
const {
|
|
28960
28984
|
TeX
|
|
28961
28985
|
} = getDependencies();
|
|
28986
|
+
const analyticsStub = {
|
|
28987
|
+
onAnalyticsEvent: () => Promise.resolve()
|
|
28988
|
+
};
|
|
28962
28989
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
28963
28990
|
className: "graph-settings"
|
|
28964
28991
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
28965
28992
|
className: "perseus-widget-row"
|
|
28966
28993
|
}, "Start: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
28967
|
-
buttonSets: [],
|
|
28968
28994
|
buttonsVisible: "never",
|
|
28969
28995
|
value: this.props.startX,
|
|
28970
|
-
onChange: this.change("startX")
|
|
28996
|
+
onChange: this.change("startX"),
|
|
28997
|
+
analytics: analyticsStub
|
|
28971
28998
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
28972
|
-
buttonSets: [],
|
|
28973
28999
|
buttonsVisible: "never",
|
|
28974
29000
|
value: this.props.startY,
|
|
28975
|
-
onChange: this.change("startY")
|
|
29001
|
+
onChange: this.change("startY"),
|
|
29002
|
+
analytics: analyticsStub
|
|
28976
29003
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
28977
29004
|
className: "perseus-widget-row"
|
|
28978
29005
|
}, "Update ", /*#__PURE__*/React__namespace.createElement(TeX, null, "(x_n, y_n)"), " for ", /*#__PURE__*/React__namespace.createElement(TeX, null, "n ="), " ", /*#__PURE__*/React__namespace.createElement(NumberInput$b, {
|
|
@@ -29026,32 +29053,35 @@ class MovableLineEditor extends React__namespace.Component {
|
|
|
29026
29053
|
const {
|
|
29027
29054
|
TeX
|
|
29028
29055
|
} = getDependencies();
|
|
29056
|
+
const analyticsStub = {
|
|
29057
|
+
onAnalyticsEvent: () => Promise.resolve()
|
|
29058
|
+
};
|
|
29029
29059
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
29030
29060
|
className: "graph-settings"
|
|
29031
29061
|
}, "Initial position:", /*#__PURE__*/React__namespace.createElement("div", {
|
|
29032
29062
|
className: "perseus-widget-row"
|
|
29033
29063
|
}, "Start: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29034
|
-
buttonSets: [],
|
|
29035
29064
|
buttonsVisible: "never",
|
|
29036
29065
|
value: this.props.startX,
|
|
29037
|
-
onChange: this.change("startX")
|
|
29066
|
+
onChange: this.change("startX"),
|
|
29067
|
+
analytics: analyticsStub
|
|
29038
29068
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29039
|
-
buttonSets: [],
|
|
29040
29069
|
buttonsVisible: "never",
|
|
29041
29070
|
value: this.props.startY,
|
|
29042
|
-
onChange: this.change("startY")
|
|
29071
|
+
onChange: this.change("startY"),
|
|
29072
|
+
analytics: analyticsStub
|
|
29043
29073
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29044
29074
|
className: "perseus-widget-row"
|
|
29045
29075
|
}, "End: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29046
|
-
buttonSets: [],
|
|
29047
29076
|
buttonsVisible: "never",
|
|
29048
29077
|
value: this.props.endX,
|
|
29049
|
-
onChange: this.change("endX")
|
|
29078
|
+
onChange: this.change("endX"),
|
|
29079
|
+
analytics: analyticsStub
|
|
29050
29080
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29051
|
-
buttonSets: [],
|
|
29052
29081
|
buttonsVisible: "never",
|
|
29053
29082
|
value: this.props.endY,
|
|
29054
|
-
onChange: this.change("endY")
|
|
29083
|
+
onChange: this.change("endY"),
|
|
29084
|
+
analytics: analyticsStub
|
|
29055
29085
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29056
29086
|
className: "perseus-widget-row"
|
|
29057
29087
|
}, "Start updates ", /*#__PURE__*/React__namespace.createElement(TeX, null, "(x_n, y_n)"), " for ", /*#__PURE__*/React__namespace.createElement(TeX, null, "n ="), /*#__PURE__*/React__namespace.createElement(NumberInput$b, {
|
|
@@ -29116,33 +29146,36 @@ class FunctionEditor extends React__namespace.Component {
|
|
|
29116
29146
|
const {
|
|
29117
29147
|
TeX
|
|
29118
29148
|
} = getDependencies();
|
|
29149
|
+
const analyticsStub = {
|
|
29150
|
+
onAnalyticsEvent: () => Promise.resolve()
|
|
29151
|
+
};
|
|
29119
29152
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
29120
29153
|
className: "graph-settings"
|
|
29121
29154
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
29122
29155
|
className: "perseus-widget-row"
|
|
29123
29156
|
}, /*#__PURE__*/React__namespace.createElement(TeX, null, this.props.funcName + "(x)="), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29124
|
-
buttonSets: [],
|
|
29125
29157
|
buttonsVisible: "never",
|
|
29126
29158
|
value: this.props.value
|
|
29127
29159
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29128
29160
|
,
|
|
29129
|
-
onChange: this.change("value")
|
|
29161
|
+
onChange: this.change("value"),
|
|
29162
|
+
analytics: analyticsStub
|
|
29130
29163
|
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29131
29164
|
className: "perseus-widget-row"
|
|
29132
29165
|
}, "Range: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29133
|
-
buttonSets: [],
|
|
29134
29166
|
buttonsVisible: "never",
|
|
29135
29167
|
value: this.props.rangeMin
|
|
29136
29168
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29137
29169
|
,
|
|
29138
|
-
onChange: this.change("rangeMin")
|
|
29170
|
+
onChange: this.change("rangeMin"),
|
|
29171
|
+
analytics: analyticsStub
|
|
29139
29172
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29140
|
-
buttonSets: [],
|
|
29141
29173
|
buttonsVisible: "never",
|
|
29142
29174
|
value: this.props.rangeMax
|
|
29143
29175
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29144
29176
|
,
|
|
29145
|
-
onChange: this.change("rangeMax")
|
|
29177
|
+
onChange: this.change("rangeMax"),
|
|
29178
|
+
analytics: analyticsStub
|
|
29146
29179
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29147
29180
|
className: "perseus-widget-row"
|
|
29148
29181
|
}, /*#__PURE__*/React__namespace.createElement(perseus.ColorPicker, {
|
|
@@ -29211,42 +29244,45 @@ class ParametricEditor extends React__namespace.Component {
|
|
|
29211
29244
|
const {
|
|
29212
29245
|
TeX
|
|
29213
29246
|
} = getDependencies();
|
|
29247
|
+
const analyticsStub = {
|
|
29248
|
+
onAnalyticsEvent: () => Promise.resolve()
|
|
29249
|
+
};
|
|
29214
29250
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
29215
29251
|
className: "graph-settings"
|
|
29216
29252
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
29217
29253
|
className: "perseus-widget-row"
|
|
29218
29254
|
}, /*#__PURE__*/React__namespace.createElement(TeX, null, "X(t) ="), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29219
|
-
buttonSets: [],
|
|
29220
29255
|
buttonsVisible: "never",
|
|
29221
29256
|
value: this.props.x
|
|
29222
29257
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29223
29258
|
,
|
|
29224
|
-
onChange: this.change("x")
|
|
29259
|
+
onChange: this.change("x"),
|
|
29260
|
+
analytics: analyticsStub
|
|
29225
29261
|
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29226
29262
|
className: "perseus-widget-row"
|
|
29227
29263
|
}, /*#__PURE__*/React__namespace.createElement(TeX, null, "Y(t) ="), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29228
|
-
buttonSets: [],
|
|
29229
29264
|
buttonsVisible: "never",
|
|
29230
29265
|
value: this.props.y
|
|
29231
29266
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29232
29267
|
,
|
|
29233
|
-
onChange: this.change("y")
|
|
29268
|
+
onChange: this.change("y"),
|
|
29269
|
+
analytics: analyticsStub
|
|
29234
29270
|
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29235
29271
|
className: "perseus-widget-row"
|
|
29236
29272
|
}, "Range: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29237
|
-
buttonSets: [],
|
|
29238
29273
|
buttonsVisible: "never",
|
|
29239
29274
|
value: this.props.rangeMin
|
|
29240
29275
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29241
29276
|
,
|
|
29242
|
-
onChange: this.change("rangeMin")
|
|
29277
|
+
onChange: this.change("rangeMin"),
|
|
29278
|
+
analytics: analyticsStub
|
|
29243
29279
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29244
|
-
buttonSets: [],
|
|
29245
29280
|
buttonsVisible: "never",
|
|
29246
29281
|
value: this.props.rangeMax
|
|
29247
29282
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29248
29283
|
,
|
|
29249
|
-
onChange: this.change("rangeMax")
|
|
29284
|
+
onChange: this.change("rangeMax"),
|
|
29285
|
+
analytics: analyticsStub
|
|
29250
29286
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29251
29287
|
className: "perseus-widget-row"
|
|
29252
29288
|
}, /*#__PURE__*/React__namespace.createElement(perseus.ColorPicker, {
|
|
@@ -29318,6 +29354,9 @@ class LabelEditor extends React__namespace.Component {
|
|
|
29318
29354
|
const {
|
|
29319
29355
|
TeX
|
|
29320
29356
|
} = getDependencies();
|
|
29357
|
+
const analyticsStub = {
|
|
29358
|
+
onAnalyticsEvent: () => Promise.resolve()
|
|
29359
|
+
};
|
|
29321
29360
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
29322
29361
|
className: "graph-settings"
|
|
29323
29362
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
@@ -29333,19 +29372,19 @@ class LabelEditor extends React__namespace.Component {
|
|
|
29333
29372
|
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29334
29373
|
className: "perseus-widget-row"
|
|
29335
29374
|
}, "Location: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29336
|
-
buttonSets: [],
|
|
29337
29375
|
buttonsVisible: "never",
|
|
29338
29376
|
value: this.props.coordX
|
|
29339
29377
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29340
29378
|
,
|
|
29341
|
-
onChange: this.change("coordX")
|
|
29379
|
+
onChange: this.change("coordX"),
|
|
29380
|
+
analytics: analyticsStub
|
|
29342
29381
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29343
|
-
buttonSets: [],
|
|
29344
29382
|
buttonsVisible: "never",
|
|
29345
29383
|
value: this.props.coordY
|
|
29346
29384
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29347
29385
|
,
|
|
29348
|
-
onChange: this.change("coordY")
|
|
29386
|
+
onChange: this.change("coordY"),
|
|
29387
|
+
analytics: analyticsStub
|
|
29349
29388
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29350
29389
|
className: "perseus-widget-row"
|
|
29351
29390
|
}, /*#__PURE__*/React__namespace.createElement(perseus.ColorPicker, {
|
|
@@ -29393,42 +29432,45 @@ class RectangleEditor extends React__namespace.Component {
|
|
|
29393
29432
|
const {
|
|
29394
29433
|
TeX
|
|
29395
29434
|
} = getDependencies();
|
|
29435
|
+
const analyticsStub = {
|
|
29436
|
+
onAnalyticsEvent: () => Promise.resolve()
|
|
29437
|
+
};
|
|
29396
29438
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
29397
29439
|
className: "graph-settings"
|
|
29398
29440
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
29399
29441
|
className: "perseus-widget-row"
|
|
29400
29442
|
}, "Bottom left: ", /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large("), /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29401
|
-
buttonSets: [],
|
|
29402
29443
|
buttonsVisible: "never",
|
|
29403
29444
|
value: this.props.coordX
|
|
29404
29445
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29405
29446
|
,
|
|
29406
|
-
onChange: this.change("coordX")
|
|
29447
|
+
onChange: this.change("coordX"),
|
|
29448
|
+
analytics: analyticsStub
|
|
29407
29449
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, ","), " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29408
|
-
buttonSets: [],
|
|
29409
29450
|
buttonsVisible: "never",
|
|
29410
29451
|
value: this.props.coordY
|
|
29411
29452
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29412
29453
|
,
|
|
29413
|
-
onChange: this.change("coordY")
|
|
29454
|
+
onChange: this.change("coordY"),
|
|
29455
|
+
analytics: analyticsStub
|
|
29414
29456
|
}), /*#__PURE__*/React__namespace.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29415
29457
|
className: "perseus-widget-row"
|
|
29416
29458
|
}, "Width:", " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29417
|
-
buttonSets: [],
|
|
29418
29459
|
buttonsVisible: "never",
|
|
29419
29460
|
value: this.props.width
|
|
29420
29461
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29421
29462
|
,
|
|
29422
|
-
onChange: this.change("width")
|
|
29463
|
+
onChange: this.change("width"),
|
|
29464
|
+
analytics: analyticsStub
|
|
29423
29465
|
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29424
29466
|
className: "perseus-widget-row"
|
|
29425
29467
|
}, "Height:", " ", /*#__PURE__*/React__namespace.createElement(MathInput, {
|
|
29426
|
-
buttonSets: [],
|
|
29427
29468
|
buttonsVisible: "never",
|
|
29428
29469
|
value: this.props.height
|
|
29429
29470
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
29430
29471
|
,
|
|
29431
|
-
onChange: this.change("height")
|
|
29472
|
+
onChange: this.change("height"),
|
|
29473
|
+
analytics: analyticsStub
|
|
29432
29474
|
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
29433
29475
|
className: "perseus-widget-row"
|
|
29434
29476
|
}, /*#__PURE__*/React__namespace.createElement(perseus.ColorPicker, {
|