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