@khanacademy/perseus-editor 2.13.0 → 2.14.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,23 @@
1
1
  # @khanacademy/perseus-editor
2
2
 
3
+ ## 2.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#804](https://github.com/Khan/perseus/pull/804) [`954dbb96`](https://github.com/Khan/perseus/commit/954dbb96eda47946a15ed819fde73aa931f318bc) Thanks [@nixterrimus](https://github.com/nixterrimus)! - Add a preferred popover direction option to label image
8
+
9
+ ### Patch Changes
10
+
11
+ - [#856](https://github.com/Khan/perseus/pull/856) [`6c323dc3`](https://github.com/Khan/perseus/commit/6c323dc37e7cc972fe5a1ab7cbf90a23bf4dd3a0) Thanks [@nedredmond](https://github.com/nedredmond)! - Upgrade WB
12
+
13
+ * [#804](https://github.com/Khan/perseus/pull/804) [`07537aae`](https://github.com/Khan/perseus/commit/07537aae870866f4418055b5956e9387f85f72c4) Thanks [@nixterrimus](https://github.com/nixterrimus)! - Unchecking periodic table option unchecks key as well
14
+
15
+ * Updated dependencies [[`2c295e2c`](https://github.com/Khan/perseus/commit/2c295e2c26ff2bf15e1e8e82bcc34e04e4b9bab0), [`ce343147`](https://github.com/Khan/perseus/commit/ce343147f558c2f2a1dcbabae20bdba22c0de86d), [`1c8f2753`](https://github.com/Khan/perseus/commit/1c8f275391b02bef8e14d1daccef8fadea9066cd), [`6c323dc3`](https://github.com/Khan/perseus/commit/6c323dc37e7cc972fe5a1ab7cbf90a23bf4dd3a0), [`7433c91b`](https://github.com/Khan/perseus/commit/7433c91bb05ad0441475f40bcd05a3076e7e19f1), [`dd41dd0e`](https://github.com/Khan/perseus/commit/dd41dd0e8bc76a414bb5906bba4648f57547f188), [`53612027`](https://github.com/Khan/perseus/commit/536120272b8cae3b01cdbe09a59488cc4704329d), [`bb9cd667`](https://github.com/Khan/perseus/commit/bb9cd667dbb4a38724ae174063021fdf18040f9b), [`4553af79`](https://github.com/Khan/perseus/commit/4553af79a26fc0e635d7dc03be74f39cb00a05f6), [`07537aae`](https://github.com/Khan/perseus/commit/07537aae870866f4418055b5956e9387f85f72c4), [`bb81559e`](https://github.com/Khan/perseus/commit/bb81559e02359092ba4d48107010c476b5ae09d5), [`fd09014c`](https://github.com/Khan/perseus/commit/fd09014c26e33d2c83a1e6ae3672027ac9583d41), [`1f4e17ba`](https://github.com/Khan/perseus/commit/1f4e17ba77e1491523813655af18a70285a25989), [`f6be48a9`](https://github.com/Khan/perseus/commit/f6be48a96795858e009bea18cc1092d150f98b71), [`34f7696b`](https://github.com/Khan/perseus/commit/34f7696b537d28c4b2054a3995f567a9a6834f73), [`8857950b`](https://github.com/Khan/perseus/commit/8857950bdeeb6e13bc3766b1c6545289b21cbe2a), [`ded7af48`](https://github.com/Khan/perseus/commit/ded7af488d57e6309f7244ca4b897ac680754d74), [`6f530d58`](https://github.com/Khan/perseus/commit/6f530d58b4368fb3c38d62d4dcf1f63cecf67d90), [`1906ec5a`](https://github.com/Khan/perseus/commit/1906ec5afb7fd7332a6cabc6afc79ee1f779f8ec), [`5e4c21bd`](https://github.com/Khan/perseus/commit/5e4c21bda5717fb793386a810be3144d7b9a9011), [`30ce593a`](https://github.com/Khan/perseus/commit/30ce593a2f1d552338ce0818cf754c13c22af281), [`cccf1897`](https://github.com/Khan/perseus/commit/cccf1897da294e4b1fec804f2639c1c56bd68201)]:
16
+ - @khanacademy/perseus@17.1.0
17
+ - @khanacademy/perseus-core@1.4.1
18
+ - @khanacademy/kas@0.3.7
19
+ - @khanacademy/kmath@0.1.8
20
+
3
21
  ## 2.13.0
4
22
 
5
23
  ### Minor Changes
package/dist/es/index.js CHANGED
@@ -24,7 +24,7 @@ import * as i18n$1 from '@khanacademy/wonder-blocks-i18n';
24
24
 
25
25
  // This file is processed by a Rollup plugin (replace) to inject the production
26
26
  const libName = "@khanacademy/perseus-editor";
27
- const libVersion = "2.13.0";
27
+ const libVersion = "2.14.0";
28
28
  addLibraryVersionToPerseusDebug(libName, libVersion);
29
29
 
30
30
  function _extends() {
@@ -23868,7 +23868,11 @@ class ItemExtrasEditor extends React.Component {
23868
23868
  checked: this.props.periodicTable,
23869
23869
  onChange: e => {
23870
23870
  this.props.onChange({
23871
- periodicTable: e.target.checked
23871
+ periodicTable: e.target.checked,
23872
+ // If the periodic table is unchecked,
23873
+ // this needs to be reset. If table is
23874
+ // checked, it should already be false.
23875
+ periodicTableWithKey: false
23872
23876
  });
23873
23877
  }
23874
23878
  })), /*#__PURE__*/React.createElement(InfoTip$m, null, "This provides the student with the ability to view a periodic table of the elements, e.g., for answering chemistry questions.")), this.props.periodicTable && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("label", null, "Include key/legend with periodic table:", " ", /*#__PURE__*/React.createElement("input", {
@@ -23906,15 +23910,6 @@ class ItemExtrasEditor extends React.Component {
23906
23910
  })), /*#__PURE__*/React.createElement(InfoTip$m, null, "This provides the student with the ability to view a table of critical values for the chi-squared distribution, e.g. for answering statistics questions."))));
23907
23911
  }
23908
23912
  }
23909
- ItemExtrasEditor.propTypes = {
23910
- calculator: PropTypes.bool,
23911
- chi2Table: PropTypes.bool,
23912
- onChange: PropTypes.func.isRequired,
23913
- periodicTable: PropTypes.bool,
23914
- periodicTableWithKey: PropTypes.bool,
23915
- tTable: PropTypes.bool,
23916
- zTable: PropTypes.bool
23917
- };
23918
23913
  ItemExtrasEditor.defaultProps = {
23919
23914
  calculator: false,
23920
23915
  chi2Table: false,
@@ -30780,6 +30775,7 @@ const {
30780
30775
  const Behavior = ({
30781
30776
  multipleAnswers,
30782
30777
  hideChoicesFromInstructions,
30778
+ preferredPopoverDirection,
30783
30779
  onChange
30784
30780
  }) => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
30785
30781
  className: css(styles$5.title)
@@ -30801,7 +30797,28 @@ const Behavior = ({
30801
30797
  })
30802
30798
  }), /*#__PURE__*/React.createElement("span", {
30803
30799
  className: css(styles$5.label)
30804
- }, "Do not display answer choices in instructions"))));
30800
+ }, "Do not display answer choices in instructions")), /*#__PURE__*/React.createElement("li", {
30801
+ className: css(styles$5.option)
30802
+ }, /*#__PURE__*/React.createElement("span", {
30803
+ className: css(styles$5.label)
30804
+ }, "Preferred pop-over direction"), /*#__PURE__*/React.createElement("select", {
30805
+ value: preferredPopoverDirection,
30806
+ onChange: e => {
30807
+ onChange({
30808
+ preferredPopoverDirection: e.target.value
30809
+ });
30810
+ }
30811
+ }, /*#__PURE__*/React.createElement("option", {
30812
+ value: "NONE"
30813
+ }, " No Preference "), /*#__PURE__*/React.createElement("option", {
30814
+ value: "UP"
30815
+ }, " Up "), /*#__PURE__*/React.createElement("option", {
30816
+ value: "DOWN"
30817
+ }, " Down "), /*#__PURE__*/React.createElement("option", {
30818
+ value: "LEFT"
30819
+ }, " Left "), /*#__PURE__*/React.createElement("option", {
30820
+ value: "RIGHT"
30821
+ }, " Right ")))));
30805
30822
  const styles$5 = StyleSheet.create({
30806
30823
  title: _extends({}, typography$2.bodyXsmallBold, {
30807
30824
  marginBottom: 6,
@@ -31575,6 +31592,7 @@ class LabelImageEditor extends React.Component {
31575
31592
  }), /*#__PURE__*/React.createElement("div", {
31576
31593
  className: css(styles.largeSpacer)
31577
31594
  }), /*#__PURE__*/React.createElement(Behavior, {
31595
+ preferredPopoverDirection: "NONE",
31578
31596
  multipleAnswers: multipleAnswers,
31579
31597
  hideChoicesFromInstructions: hideChoicesFromInstructions,
31580
31598
  onChange: this.handleBehaviorChange