@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 CHANGED
@@ -1,5 +1,34 @@
1
1
  # @khanacademy/perseus-editor
2
2
 
3
+ ## 2.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5bcf118c: Desktop Expression Widget now uses v2 keypad
8
+
9
+ ### Patch Changes
10
+
11
+ - 5bcf118c: # Update MathInput
12
+
13
+ - `buttonSets` is now deprecated in favor of `keypadButtonSets`, but currently maps to the new prop for backwards compatability.
14
+ - `buttonsVisible` is now a bit misleading: "focused" is the default state with a toggle-able keypad and "always" shows the keypad by default.
15
+
16
+ - Updated dependencies [5bcf118c]
17
+ - Updated dependencies [5bcf118c]
18
+ - @khanacademy/perseus@12.0.0
19
+
20
+ ## 2.7.7
21
+
22
+ ### Patch Changes
23
+
24
+ - 55d4cd00: Print package name and version when loaded in the page
25
+ - Updated dependencies [1721c05c]
26
+ - Updated dependencies [55d4cd00]
27
+ - @khanacademy/perseus@11.6.1
28
+ - @khanacademy/kas@0.3.2
29
+ - @khanacademy/kmath@0.1.3
30
+ - @khanacademy/perseus-core@1.1.1
31
+
3
32
  ## 2.7.6
4
33
 
5
34
  ### Patch Changes
package/dist/es/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { addLibraryVersionToPerseusDebug } from '@khanacademy/perseus-core';
1
2
  import { constants, components, Widgets, icons, WIDGET_PROP_DENYLIST, Util, Log, PerseusError, Errors, PerseusMarkdown, preprocessTex, ApiOptions, buildMapper, itemToTree, buildEmptyItemTreeForShape, shapes, itemDataVersion, ClassNames, MultiItems, traverse, Categorizer as Categorizer$1, Changeable, EditorJsonify, Dependencies, WidgetJsonifyDeprecated, PerseusExpressionAnswerFormConsidered, Expression, interactiveSizes, KhanMath, GrapherWidget, GrapherUtil, SizingUtils, KhanColors, ColorPicker, DashPicker, ArrowPicker, ElementContainer, InteractiveGraphWidget, globalStyles, globalConstants, MatrixWidget, PlotterWidget, BaseRadio, TableWidget, TransformerWidget, displaySigFigs, widgets } from '@khanacademy/perseus';
2
3
  import * as React from 'react';
3
4
  import _ from 'underscore';
@@ -19,6 +20,11 @@ import * as Typography from '@khanacademy/wonder-blocks-typography';
19
20
  import Button from '@khanacademy/wonder-blocks-button';
20
21
  import * as i18n$1 from '@khanacademy/wonder-blocks-i18n';
21
22
 
23
+ // This file is processed by a Rollup plugin (replace) to inject the production
24
+ const libName = "@khanacademy/perseus-editor";
25
+ const libVersion = "2.8.0";
26
+ addLibraryVersionToPerseusDebug(libName, libVersion);
27
+
22
28
  function _extends() {
23
29
  _extends = Object.assign || function (target) {
24
30
  for (var i = 1; i < arguments.length; i++) {
@@ -26734,6 +26740,16 @@ const {
26734
26740
  const {
26735
26741
  getDependencies: getDependencies$2
26736
26742
  } = Dependencies;
26743
+ const parseAnswerKey = ({
26744
+ key
26745
+ }) => {
26746
+ const parsedKey = Number.parseInt(key != null ? key : "");
26747
+ if (Number.isNaN(parsedKey)) {
26748
+ throw new Error(`Invalid answer key: ${key}`);
26749
+ }
26750
+ return parsedKey;
26751
+ };
26752
+
26737
26753
  // Pick a key that isn't currently used by an answer in answerForms
26738
26754
  const _makeNewKey = answerForms => {
26739
26755
  // first note all the currently used keys in an array, used like a map :3
@@ -26741,7 +26757,7 @@ const _makeNewKey = answerForms => {
26741
26757
  // be one past the largest key.
26742
26758
  const usedKeys = [];
26743
26759
  answerForms.forEach(ans => {
26744
- usedKeys[ans.key] = true;
26760
+ usedKeys[parseAnswerKey(ans)] = true;
26745
26761
  });
26746
26762
 
26747
26763
  // then scan through the array to find the first unused (undefined) key
@@ -26912,7 +26928,8 @@ class ExpressionEditor extends React.Component {
26912
26928
  return Changeable.change.apply(this, args);
26913
26929
  }
26914
26930
  render() {
26915
- const answerOptions = this.props.answerForms.map((obj, index) => {
26931
+ const answerOptions = this.props.answerForms.map(ans => {
26932
+ const key = parseAnswerKey(ans);
26916
26933
  const expressionProps = {
26917
26934
  // note we're using
26918
26935
  // *this.props*.{times,functions,buttonSets} since each
@@ -26921,21 +26938,24 @@ class ExpressionEditor extends React.Component {
26921
26938
  functions: this.props.functions,
26922
26939
  buttonSets: this.props.buttonSets,
26923
26940
  buttonsVisible: "focused",
26924
- form: obj.form,
26925
- simplify: obj.simplify,
26926
- value: obj.value,
26927
- onChange: props => this.updateForm(index, props),
26941
+ form: ans.form,
26942
+ simplify: ans.simplify,
26943
+ value: ans.value,
26944
+ onChange: props => this.updateForm(key, props),
26928
26945
  trackInteraction: () => {},
26929
- widgetId: this.props.widgetId + "-" + index
26946
+ widgetId: this.props.widgetId + "-" + ans.key
26930
26947
  };
26931
- return lens(obj).merge([], {
26948
+ return lens(ans).merge([], {
26932
26949
  draggable: true,
26933
- onChange: props => this.updateForm(index, props),
26934
- onDelete: () => this.handleRemoveForm(index),
26950
+ onChange: props => {
26951
+ var _ans$key;
26952
+ return this.updateForm(Number.parseInt((_ans$key = ans.key) != null ? _ans$key : ""), props);
26953
+ },
26954
+ onDelete: () => this.handleRemoveForm(key),
26935
26955
  expressionProps: expressionProps
26936
26956
  }).freeze();
26937
- }).map((obj, index) => /*#__PURE__*/React.createElement(AnswerOption, _extends({
26938
- key: index
26957
+ }).map(obj => /*#__PURE__*/React.createElement(AnswerOption, _extends({
26958
+ key: obj.key
26939
26959
  }, obj)));
26940
26960
  const sortable = /*#__PURE__*/React.createElement(SortableArea, {
26941
26961
  components: answerOptions,
@@ -28507,6 +28527,9 @@ class ConstraintEditor extends React.Component {
28507
28527
  const {
28508
28528
  TeX
28509
28529
  } = Dependencies.getDependencies();
28530
+ const analyticsStub = {
28531
+ onAnalyticsEvent: () => Promise.resolve()
28532
+ };
28510
28533
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
28511
28534
  className: "perseus-widget-row"
28512
28535
  }, "Constraint:", " ", /*#__PURE__*/React.createElement(ButtonGroup$2, {
@@ -28537,47 +28560,47 @@ class ConstraintEditor extends React.Component {
28537
28560
  }, /*#__PURE__*/React.createElement("div", {
28538
28561
  className: "perseus-widget-row"
28539
28562
  }, /*#__PURE__*/React.createElement(TeX, null, "x="), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28540
- buttonSets: [],
28541
28563
  buttonsVisible: "never",
28542
28564
  value: this.props.constraintFn,
28543
- onChange: this.change("constraintFn")
28565
+ onChange: this.change("constraintFn"),
28566
+ analytics: analyticsStub
28544
28567
  }))), this.props.constraint === "y" && /*#__PURE__*/React.createElement("div", {
28545
28568
  className: "graph-settings"
28546
28569
  }, /*#__PURE__*/React.createElement("div", {
28547
28570
  className: "perseus-widget-row"
28548
28571
  }, /*#__PURE__*/React.createElement(TeX, null, "y="), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28549
- buttonSets: [],
28550
28572
  buttonsVisible: "never",
28551
28573
  value: this.props.constraintFn,
28552
- onChange: this.change("constraintFn")
28574
+ onChange: this.change("constraintFn"),
28575
+ analytics: analyticsStub
28553
28576
  }))), "Ensure these are set so nothing can be dragged off the canvas:", /*#__PURE__*/React.createElement("div", {
28554
28577
  className: "perseus-widget-row"
28555
28578
  }, /*#__PURE__*/React.createElement("div", {
28556
28579
  className: "perseus-widget-row"
28557
28580
  }, /*#__PURE__*/React.createElement(TeX, null, "x \\in \\Large["), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28558
- buttonSets: [],
28559
28581
  buttonsVisible: "never",
28560
28582
  value: this.props.constraintXMin,
28561
- onChange: this.change("constraintXMin")
28583
+ onChange: this.change("constraintXMin"),
28584
+ analytics: analyticsStub
28562
28585
  }), /*#__PURE__*/React.createElement(TeX, null, ", "), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28563
- buttonSets: [],
28564
28586
  buttonsVisible: "never",
28565
28587
  value: this.props.constraintXMax,
28566
- onChange: this.change("constraintXMax")
28588
+ onChange: this.change("constraintXMax"),
28589
+ analytics: analyticsStub
28567
28590
  }), " ", /*#__PURE__*/React.createElement(TeX, null, "\\Large]"))), /*#__PURE__*/React.createElement("div", {
28568
28591
  className: "perseus-widget-row"
28569
28592
  }, /*#__PURE__*/React.createElement("div", {
28570
28593
  className: "perseus-widget-row"
28571
28594
  }, /*#__PURE__*/React.createElement(TeX, null, "y \\in \\Large["), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28572
- buttonSets: [],
28573
28595
  buttonsVisible: "never",
28574
28596
  value: this.props.constraintYMin,
28575
- onChange: this.change("constraintYMin")
28597
+ onChange: this.change("constraintYMin"),
28598
+ analytics: analyticsStub
28576
28599
  }), /*#__PURE__*/React.createElement(TeX, null, ", "), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28577
- buttonSets: [],
28578
28600
  buttonsVisible: "never",
28579
28601
  value: this.props.constraintYMax,
28580
- onChange: this.change("constraintYMax")
28602
+ onChange: this.change("constraintYMax"),
28603
+ analytics: analyticsStub
28581
28604
  }), " ", /*#__PURE__*/React.createElement(TeX, null, "\\Large]"))));
28582
28605
  }
28583
28606
  }
@@ -28632,24 +28655,27 @@ class PointEditor extends React.Component {
28632
28655
  const {
28633
28656
  TeX
28634
28657
  } = getDependencies();
28658
+ const analyticsStub = {
28659
+ onAnalyticsEvent: () => Promise.resolve()
28660
+ };
28635
28661
  return /*#__PURE__*/React.createElement("div", {
28636
28662
  className: "graph-settings"
28637
28663
  }, /*#__PURE__*/React.createElement("div", {
28638
28664
  className: "perseus-widget-row"
28639
28665
  }, "Coordinate: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28640
- buttonSets: [],
28641
28666
  buttonsVisible: "never",
28642
28667
  value: this.props.coordX
28643
28668
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28644
28669
  ,
28645
- onChange: this.change("coordX")
28670
+ onChange: this.change("coordX"),
28671
+ analytics: analyticsStub
28646
28672
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28647
- buttonSets: [],
28648
28673
  buttonsVisible: "never",
28649
28674
  value: this.props.coordY
28650
28675
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28651
28676
  ,
28652
- onChange: this.change("coordY")
28677
+ onChange: this.change("coordY"),
28678
+ analytics: analyticsStub
28653
28679
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28654
28680
  className: "perseus-widget-row"
28655
28681
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -28689,40 +28715,43 @@ class LineEditor extends React.Component {
28689
28715
  const {
28690
28716
  TeX
28691
28717
  } = getDependencies();
28718
+ const analyticsStub = {
28719
+ onAnalyticsEvent: () => Promise.resolve()
28720
+ };
28692
28721
  return /*#__PURE__*/React.createElement("div", {
28693
28722
  className: "graph-settings"
28694
28723
  }, /*#__PURE__*/React.createElement("div", {
28695
28724
  className: "perseus-widget-row"
28696
28725
  }, "Start: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28697
- buttonSets: [],
28698
28726
  buttonsVisible: "never",
28699
28727
  value: this.props.startX
28700
28728
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28701
28729
  ,
28702
- onChange: this.change("startX")
28730
+ onChange: this.change("startX"),
28731
+ analytics: analyticsStub
28703
28732
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28704
- buttonSets: [],
28705
28733
  buttonsVisible: "never",
28706
28734
  value: this.props.startY
28707
28735
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28708
28736
  ,
28709
- onChange: this.change("startY")
28737
+ onChange: this.change("startY"),
28738
+ analytics: analyticsStub
28710
28739
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28711
28740
  className: "perseus-widget-row"
28712
28741
  }, "End: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28713
- buttonSets: [],
28714
28742
  buttonsVisible: "never",
28715
28743
  value: this.props.endX
28716
28744
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28717
28745
  ,
28718
- onChange: this.change("endX")
28746
+ onChange: this.change("endX"),
28747
+ analytics: analyticsStub
28719
28748
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28720
- buttonSets: [],
28721
28749
  buttonsVisible: "never",
28722
28750
  value: this.props.endY
28723
28751
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28724
28752
  ,
28725
- onChange: this.change("endY")
28753
+ onChange: this.change("endY"),
28754
+ analytics: analyticsStub
28726
28755
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28727
28756
  className: "perseus-widget-row"
28728
28757
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -28795,20 +28824,23 @@ class MovablePointEditor extends React.Component {
28795
28824
  const {
28796
28825
  TeX
28797
28826
  } = getDependencies();
28827
+ const analyticsStub = {
28828
+ onAnalyticsEvent: () => Promise.resolve()
28829
+ };
28798
28830
  return /*#__PURE__*/React.createElement("div", {
28799
28831
  className: "graph-settings"
28800
28832
  }, /*#__PURE__*/React.createElement("div", {
28801
28833
  className: "perseus-widget-row"
28802
28834
  }, "Start: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28803
- buttonSets: [],
28804
28835
  buttonsVisible: "never",
28805
28836
  value: this.props.startX,
28806
- onChange: this.change("startX")
28837
+ onChange: this.change("startX"),
28838
+ analytics: analyticsStub
28807
28839
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28808
- buttonSets: [],
28809
28840
  buttonsVisible: "never",
28810
28841
  value: this.props.startY,
28811
- onChange: this.change("startY")
28842
+ onChange: this.change("startY"),
28843
+ analytics: analyticsStub
28812
28844
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28813
28845
  className: "perseus-widget-row"
28814
28846
  }, "Update ", /*#__PURE__*/React.createElement(TeX, null, "(x_n, y_n)"), " for ", /*#__PURE__*/React.createElement(TeX, null, "n ="), " ", /*#__PURE__*/React.createElement(NumberInput$b, {
@@ -28856,32 +28888,35 @@ class MovableLineEditor extends React.Component {
28856
28888
  const {
28857
28889
  TeX
28858
28890
  } = getDependencies();
28891
+ const analyticsStub = {
28892
+ onAnalyticsEvent: () => Promise.resolve()
28893
+ };
28859
28894
  return /*#__PURE__*/React.createElement("div", {
28860
28895
  className: "graph-settings"
28861
28896
  }, "Initial position:", /*#__PURE__*/React.createElement("div", {
28862
28897
  className: "perseus-widget-row"
28863
28898
  }, "Start: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28864
- buttonSets: [],
28865
28899
  buttonsVisible: "never",
28866
28900
  value: this.props.startX,
28867
- onChange: this.change("startX")
28901
+ onChange: this.change("startX"),
28902
+ analytics: analyticsStub
28868
28903
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28869
- buttonSets: [],
28870
28904
  buttonsVisible: "never",
28871
28905
  value: this.props.startY,
28872
- onChange: this.change("startY")
28906
+ onChange: this.change("startY"),
28907
+ analytics: analyticsStub
28873
28908
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28874
28909
  className: "perseus-widget-row"
28875
28910
  }, "End: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28876
- buttonSets: [],
28877
28911
  buttonsVisible: "never",
28878
28912
  value: this.props.endX,
28879
- onChange: this.change("endX")
28913
+ onChange: this.change("endX"),
28914
+ analytics: analyticsStub
28880
28915
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28881
- buttonSets: [],
28882
28916
  buttonsVisible: "never",
28883
28917
  value: this.props.endY,
28884
- onChange: this.change("endY")
28918
+ onChange: this.change("endY"),
28919
+ analytics: analyticsStub
28885
28920
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28886
28921
  className: "perseus-widget-row"
28887
28922
  }, "Start updates ", /*#__PURE__*/React.createElement(TeX, null, "(x_n, y_n)"), " for ", /*#__PURE__*/React.createElement(TeX, null, "n ="), /*#__PURE__*/React.createElement(NumberInput$b, {
@@ -28940,33 +28975,36 @@ class FunctionEditor extends React.Component {
28940
28975
  const {
28941
28976
  TeX
28942
28977
  } = getDependencies();
28978
+ const analyticsStub = {
28979
+ onAnalyticsEvent: () => Promise.resolve()
28980
+ };
28943
28981
  return /*#__PURE__*/React.createElement("div", {
28944
28982
  className: "graph-settings"
28945
28983
  }, /*#__PURE__*/React.createElement("div", {
28946
28984
  className: "perseus-widget-row"
28947
28985
  }, /*#__PURE__*/React.createElement(TeX, null, this.props.funcName + "(x)="), " ", /*#__PURE__*/React.createElement(MathInput, {
28948
- buttonSets: [],
28949
28986
  buttonsVisible: "never",
28950
28987
  value: this.props.value
28951
28988
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28952
28989
  ,
28953
- onChange: this.change("value")
28990
+ onChange: this.change("value"),
28991
+ analytics: analyticsStub
28954
28992
  })), /*#__PURE__*/React.createElement("div", {
28955
28993
  className: "perseus-widget-row"
28956
28994
  }, "Range: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28957
- buttonSets: [],
28958
28995
  buttonsVisible: "never",
28959
28996
  value: this.props.rangeMin
28960
28997
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28961
28998
  ,
28962
- onChange: this.change("rangeMin")
28999
+ onChange: this.change("rangeMin"),
29000
+ analytics: analyticsStub
28963
29001
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28964
- buttonSets: [],
28965
29002
  buttonsVisible: "never",
28966
29003
  value: this.props.rangeMax
28967
29004
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28968
29005
  ,
28969
- onChange: this.change("rangeMax")
29006
+ onChange: this.change("rangeMax"),
29007
+ analytics: analyticsStub
28970
29008
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28971
29009
  className: "perseus-widget-row"
28972
29010
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -29029,42 +29067,45 @@ class ParametricEditor extends React.Component {
29029
29067
  const {
29030
29068
  TeX
29031
29069
  } = getDependencies();
29070
+ const analyticsStub = {
29071
+ onAnalyticsEvent: () => Promise.resolve()
29072
+ };
29032
29073
  return /*#__PURE__*/React.createElement("div", {
29033
29074
  className: "graph-settings"
29034
29075
  }, /*#__PURE__*/React.createElement("div", {
29035
29076
  className: "perseus-widget-row"
29036
29077
  }, /*#__PURE__*/React.createElement(TeX, null, "X(t) ="), " ", /*#__PURE__*/React.createElement(MathInput, {
29037
- buttonSets: [],
29038
29078
  buttonsVisible: "never",
29039
29079
  value: this.props.x
29040
29080
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29041
29081
  ,
29042
- onChange: this.change("x")
29082
+ onChange: this.change("x"),
29083
+ analytics: analyticsStub
29043
29084
  })), /*#__PURE__*/React.createElement("div", {
29044
29085
  className: "perseus-widget-row"
29045
29086
  }, /*#__PURE__*/React.createElement(TeX, null, "Y(t) ="), " ", /*#__PURE__*/React.createElement(MathInput, {
29046
- buttonSets: [],
29047
29087
  buttonsVisible: "never",
29048
29088
  value: this.props.y
29049
29089
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29050
29090
  ,
29051
- onChange: this.change("y")
29091
+ onChange: this.change("y"),
29092
+ analytics: analyticsStub
29052
29093
  })), /*#__PURE__*/React.createElement("div", {
29053
29094
  className: "perseus-widget-row"
29054
29095
  }, "Range: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
29055
- buttonSets: [],
29056
29096
  buttonsVisible: "never",
29057
29097
  value: this.props.rangeMin
29058
29098
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29059
29099
  ,
29060
- onChange: this.change("rangeMin")
29100
+ onChange: this.change("rangeMin"),
29101
+ analytics: analyticsStub
29061
29102
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
29062
- buttonSets: [],
29063
29103
  buttonsVisible: "never",
29064
29104
  value: this.props.rangeMax
29065
29105
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29066
29106
  ,
29067
- onChange: this.change("rangeMax")
29107
+ onChange: this.change("rangeMax"),
29108
+ analytics: analyticsStub
29068
29109
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
29069
29110
  className: "perseus-widget-row"
29070
29111
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -29130,6 +29171,9 @@ class LabelEditor extends React.Component {
29130
29171
  const {
29131
29172
  TeX
29132
29173
  } = getDependencies();
29174
+ const analyticsStub = {
29175
+ onAnalyticsEvent: () => Promise.resolve()
29176
+ };
29133
29177
  return /*#__PURE__*/React.createElement("div", {
29134
29178
  className: "graph-settings"
29135
29179
  }, /*#__PURE__*/React.createElement("div", {
@@ -29145,19 +29189,19 @@ class LabelEditor extends React.Component {
29145
29189
  })), /*#__PURE__*/React.createElement("div", {
29146
29190
  className: "perseus-widget-row"
29147
29191
  }, "Location: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
29148
- buttonSets: [],
29149
29192
  buttonsVisible: "never",
29150
29193
  value: this.props.coordX
29151
29194
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29152
29195
  ,
29153
- onChange: this.change("coordX")
29196
+ onChange: this.change("coordX"),
29197
+ analytics: analyticsStub
29154
29198
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
29155
- buttonSets: [],
29156
29199
  buttonsVisible: "never",
29157
29200
  value: this.props.coordY
29158
29201
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29159
29202
  ,
29160
- onChange: this.change("coordY")
29203
+ onChange: this.change("coordY"),
29204
+ analytics: analyticsStub
29161
29205
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
29162
29206
  className: "perseus-widget-row"
29163
29207
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -29199,42 +29243,45 @@ class RectangleEditor extends React.Component {
29199
29243
  const {
29200
29244
  TeX
29201
29245
  } = getDependencies();
29246
+ const analyticsStub = {
29247
+ onAnalyticsEvent: () => Promise.resolve()
29248
+ };
29202
29249
  return /*#__PURE__*/React.createElement("div", {
29203
29250
  className: "graph-settings"
29204
29251
  }, /*#__PURE__*/React.createElement("div", {
29205
29252
  className: "perseus-widget-row"
29206
29253
  }, "Bottom left: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
29207
- buttonSets: [],
29208
29254
  buttonsVisible: "never",
29209
29255
  value: this.props.coordX
29210
29256
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29211
29257
  ,
29212
- onChange: this.change("coordX")
29258
+ onChange: this.change("coordX"),
29259
+ analytics: analyticsStub
29213
29260
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
29214
- buttonSets: [],
29215
29261
  buttonsVisible: "never",
29216
29262
  value: this.props.coordY
29217
29263
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29218
29264
  ,
29219
- onChange: this.change("coordY")
29265
+ onChange: this.change("coordY"),
29266
+ analytics: analyticsStub
29220
29267
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
29221
29268
  className: "perseus-widget-row"
29222
29269
  }, "Width:", " ", /*#__PURE__*/React.createElement(MathInput, {
29223
- buttonSets: [],
29224
29270
  buttonsVisible: "never",
29225
29271
  value: this.props.width
29226
29272
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29227
29273
  ,
29228
- onChange: this.change("width")
29274
+ onChange: this.change("width"),
29275
+ analytics: analyticsStub
29229
29276
  })), /*#__PURE__*/React.createElement("div", {
29230
29277
  className: "perseus-widget-row"
29231
29278
  }, "Height:", " ", /*#__PURE__*/React.createElement(MathInput, {
29232
- buttonSets: [],
29233
29279
  buttonsVisible: "never",
29234
29280
  value: this.props.height
29235
29281
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29236
29282
  ,
29237
- onChange: this.change("height")
29283
+ onChange: this.change("height"),
29284
+ analytics: analyticsStub
29238
29285
  })), /*#__PURE__*/React.createElement("div", {
29239
29286
  className: "perseus-widget-row"
29240
29287
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -35478,5 +35525,5 @@ var AllWidgets = [...widgets, ...testingWidgets];
35478
35525
  Widgets.registerEditors(AllEditors);
35479
35526
  Widgets.registerWidgets(AllWidgets);
35480
35527
 
35481
- export { AllEditors, AllWidgets, ArticleDiff, ArticleEditor, DeviceFramer, Editor, EditorPage, IframeContentRenderer, ItemDiff, MultiRendererEditor, StatefulArticleEditor, StatefulEditorPage, StructuredItemDiff, ViewportResizer, i18n };
35528
+ export { AllEditors, AllWidgets, ArticleDiff, ArticleEditor, DeviceFramer, Editor, EditorPage, IframeContentRenderer, ItemDiff, MultiRendererEditor, StatefulArticleEditor, StatefulEditorPage, StructuredItemDiff, ViewportResizer, i18n, libVersion };
35482
35529
  //# sourceMappingURL=index.js.map