@pie-element/math-inline 5.9.0 → 5.9.1-beta.1443

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/lib/print.js ADDED
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+
14
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
15
+
16
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
17
+
18
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
19
+
20
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
21
+
22
+ var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
23
+
24
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
25
+
26
+ var _react = _interopRequireDefault(require("react"));
27
+
28
+ var _reactDom = _interopRequireDefault(require("react-dom"));
29
+
30
+ var _debounce = _interopRequireDefault(require("lodash/debounce"));
31
+
32
+ var _main = _interopRequireDefault(require("./main"));
33
+
34
+ var _mathRendering = require("@pie-lib/math-rendering");
35
+
36
+ var _debug = _interopRequireDefault(require("debug"));
37
+
38
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
39
+
40
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
+
42
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
43
+
44
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
45
+
46
+ var log = (0, _debug["default"])('pie-element:math-inline:print');
47
+ /**
48
+ * Live in same package as main element - so we can access some of the shared comps!
49
+ *
50
+ * - update pslb to build print if src/print.js is there
51
+ * - update demo el
52
+ * - get configure/controller building
53
+ */
54
+
55
+ var preparePrintModel = function preparePrintModel(model, opts) {
56
+ var instr = opts.role === 'instructor';
57
+ model.prompt = model.promptEnabled !== false ? model.prompt : undefined;
58
+ model.teacherInstructions = instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;
59
+ model.rationale = instr && model.rationaleEnabled !== false ? model.rationale : undefined;
60
+ model.showTeacherInstructions = instr;
61
+ model.alwaysShowCorrect = instr;
62
+ model.printMode = true;
63
+ model.feedback = undefined;
64
+ model.expression = model.expression || '{{response}}';
65
+ model.animationsDisabled = true;
66
+ return _objectSpread(_objectSpread({}, model), {}, {
67
+ disabled: true,
68
+ config: _objectSpread(_objectSpread({}, model), {}, {
69
+ env: {
70
+ mode: instr ? 'evaluate' : model.mode,
71
+ role: opts.role
72
+ }
73
+ })
74
+ });
75
+ };
76
+
77
+ var MathInlinePrint = /*#__PURE__*/function (_HTMLElement) {
78
+ (0, _inherits2["default"])(MathInlinePrint, _HTMLElement);
79
+
80
+ var _super = _createSuper(MathInlinePrint);
81
+
82
+ function MathInlinePrint() {
83
+ var _this;
84
+
85
+ (0, _classCallCheck2["default"])(this, MathInlinePrint);
86
+ _this = _super.call(this);
87
+ _this._options = null;
88
+ _this._model = null;
89
+ _this._session = [];
90
+ _this._rerender = (0, _debounce["default"])(function () {
91
+ if (_this._model && _this._session) {
92
+ var printModel = preparePrintModel(_this._model, _this._options);
93
+
94
+ var element = _this._options && /*#__PURE__*/_react["default"].createElement(_main["default"], {
95
+ model: printModel,
96
+ session: {}
97
+ });
98
+
99
+ _reactDom["default"].render(element, (0, _assertThisInitialized2["default"])(_this), function () {
100
+ log('render complete - render math');
101
+ (0, _mathRendering.renderMath)((0, _assertThisInitialized2["default"])(_this));
102
+ });
103
+ } else {
104
+ log('skip');
105
+ }
106
+ }, 50, {
107
+ leading: false,
108
+ trailing: true
109
+ });
110
+ return _this;
111
+ }
112
+
113
+ (0, _createClass2["default"])(MathInlinePrint, [{
114
+ key: "options",
115
+ set: function set(o) {
116
+ this._options = o;
117
+ }
118
+ }, {
119
+ key: "model",
120
+ set: function set(s) {
121
+ this._model = s;
122
+
123
+ this._rerender();
124
+ }
125
+ }, {
126
+ key: "connectedCallback",
127
+ value: function connectedCallback() {}
128
+ }]);
129
+ return MathInlinePrint;
130
+ }( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLElement));
131
+
132
+ exports["default"] = MathInlinePrint;
133
+ //# sourceMappingURL=print.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/print.js"],"names":["log","preparePrintModel","model","opts","instr","role","prompt","promptEnabled","undefined","teacherInstructions","teacherInstructionsEnabled","rationale","rationaleEnabled","showTeacherInstructions","alwaysShowCorrect","printMode","feedback","expression","animationsDisabled","disabled","config","env","mode","MathInlinePrint","_options","_model","_session","_rerender","printModel","element","React","createElement","Main","session","ReactDOM","render","leading","trailing","o","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,+BAAN,CAAZ;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,KAAD,EAAQC,IAAR,EAAiB;AACzC,MAAMC,KAAK,GAAGD,IAAI,CAACE,IAAL,KAAc,YAA5B;AAEAH,EAAAA,KAAK,CAACI,MAAN,GAAeJ,KAAK,CAACK,aAAN,KAAwB,KAAxB,GAAgCL,KAAK,CAACI,MAAtC,GAA+CE,SAA9D;AACAN,EAAAA,KAAK,CAACO,mBAAN,GACEL,KAAK,IAAIF,KAAK,CAACQ,0BAAN,KAAqC,KAA9C,GAAsDR,KAAK,CAACO,mBAA5D,GAAkFD,SADpF;AAEAN,EAAAA,KAAK,CAACS,SAAN,GAAkBP,KAAK,IAAIF,KAAK,CAACU,gBAAN,KAA2B,KAApC,GAA4CV,KAAK,CAACS,SAAlD,GAA8DH,SAAhF;AACAN,EAAAA,KAAK,CAACW,uBAAN,GAAgCT,KAAhC;AACAF,EAAAA,KAAK,CAACY,iBAAN,GAA0BV,KAA1B;AACAF,EAAAA,KAAK,CAACa,SAAN,GAAkB,IAAlB;AACAb,EAAAA,KAAK,CAACc,QAAN,GAAiBR,SAAjB;AACAN,EAAAA,KAAK,CAACe,UAAN,GAAmBf,KAAK,CAACe,UAAN,IAAoB,cAAvC;AAEAf,EAAAA,KAAK,CAACgB,kBAAN,GAA2B,IAA3B;AACA,yCACKhB,KADL;AAEEiB,IAAAA,QAAQ,EAAE,IAFZ;AAGEC,IAAAA,MAAM,kCACDlB,KADC;AAEJmB,MAAAA,GAAG,EAAE;AAAEC,QAAAA,IAAI,EAAElB,KAAK,GAAG,UAAH,GAAgBF,KAAK,CAACoB,IAAnC;AAAyCjB,QAAAA,IAAI,EAAEF,IAAI,CAACE;AAApD;AAFD;AAHR;AAQD,CAtBD;;IAwBqBkB,e;;;;;AACnB,6BAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,QAAL,GAAgB,IAAhB;AACA,UAAKC,MAAL,GAAc,IAAd;AACA,UAAKC,QAAL,GAAgB,EAAhB;AACA,UAAKC,SAAL,GAAiB,0BACf,YAAM;AACJ,UAAI,MAAKF,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAME,UAAU,GAAG3B,iBAAiB,CAAC,MAAKwB,MAAN,EAAc,MAAKD,QAAnB,CAApC;;AAEA,YAAMK,OAAO,GACX,MAAKL,QAAL,iBACAM,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACxB9B,UAAAA,KAAK,EAAE0B,UADiB;AAExBK,UAAAA,OAAO,EAAE;AAFe,SAA1B,CAFF;;AAOAC,6BAASC,MAAT,CAAgBN,OAAhB,kDAA+B,YAAM;AACnC7B,UAAAA,GAAG,CAAC,+BAAD,CAAH;AACA;AACD,SAHD;AAID,OAdD,MAcO;AACLA,QAAAA,GAAG,CAAC,MAAD,CAAH;AACD;AACF,KAnBc,EAoBf,EApBe,EAqBf;AAAEoC,MAAAA,OAAO,EAAE,KAAX;AAAkBC,MAAAA,QAAQ,EAAE;AAA5B,KArBe,CAAjB;AALY;AA4Bb;;;;SACD,aAAYC,CAAZ,EAAe;AACb,WAAKd,QAAL,GAAgBc,CAAhB;AACD;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKd,MAAL,GAAcc,CAAd;;AACA,WAAKZ,SAAL;AACD;;;WAED,6BAAoB,CAAE;;;kDAvCqBa,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport debounce from 'lodash/debounce';\nimport Main from './main';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport debug from 'debug';\n\nconst log = debug('pie-element:math-inline:print');\n\n/**\n * Live in same package as main element - so we can access some of the shared comps!\n *\n * - update pslb to build print if src/print.js is there\n * - update demo el\n * - get configure/controller building\n */\n\nconst preparePrintModel = (model, opts) => {\n const instr = opts.role === 'instructor';\n\n model.prompt = model.promptEnabled !== false ? model.prompt : undefined;\n model.teacherInstructions =\n instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;\n model.rationale = instr && model.rationaleEnabled !== false ? model.rationale : undefined;\n model.showTeacherInstructions = instr;\n model.alwaysShowCorrect = instr;\n model.printMode = true;\n model.feedback = undefined;\n model.expression = model.expression || '{{response}}';\n\n model.animationsDisabled = true;\n return {\n ...model,\n disabled: true,\n config: {\n ...model,\n env: { mode: instr ? 'evaluate' : model.mode, role: opts.role },\n },\n };\n};\n\nexport default class MathInlinePrint extends HTMLElement {\n constructor() {\n super();\n this._options = null;\n this._model = null;\n this._session = [];\n this._rerender = debounce(\n () => {\n if (this._model && this._session) {\n const printModel = preparePrintModel(this._model, this._options);\n\n const element =\n this._options &&\n React.createElement(Main, {\n model: printModel,\n session: {},\n });\n\n ReactDOM.render(element, this, () => {\n log('render complete - render math');\n renderMath(this);\n });\n } else {\n log('skip');\n }\n },\n 50,\n { leading: false, trailing: true },\n );\n }\n set options(o) {\n this._options = o;\n }\n\n set model(s) {\n this._model = s;\n this._rerender();\n }\n\n connectedCallback() {}\n}\n"],"file":"print.js"}
@@ -44,39 +44,47 @@ var SimpleQuestionBlockRaw = /*#__PURE__*/function (_React$Component) {
44
44
 
45
45
  var _super = _createSuper(SimpleQuestionBlockRaw);
46
46
 
47
- function SimpleQuestionBlockRaw() {
47
+ function SimpleQuestionBlockRaw(props) {
48
48
  var _this;
49
49
 
50
50
  (0, _classCallCheck2["default"])(this, SimpleQuestionBlockRaw);
51
-
52
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
53
- args[_key] = arguments[_key];
54
- }
55
-
56
- _this = _super.call.apply(_super, [this].concat(args));
57
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
58
- showKeypad: true
51
+ _this = _super.call(this, props);
52
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "mathToolBarContainsTarget", function (e) {
53
+ return document.getElementById(_this.mathToolBarId).contains(e.target);
54
+ });
55
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleClick", function (e) {
56
+ try {
57
+ if (!_this.mathToolBarContainsTarget(e)) {
58
+ _this.setState({
59
+ showKeypad: false
60
+ });
61
+ }
62
+ } catch (e) {// console.log(e.toString());
63
+ }
59
64
  });
60
65
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onFocus", function () {
61
66
  return _this.setState({
62
67
  showKeypad: true
63
68
  });
64
69
  });
65
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onBlur", function (e) {
66
- var _ref = e || {},
67
- relatedTarget = _ref.relatedTarget,
68
- currentTarget = _ref.currentTarget;
69
-
70
- if (!relatedTarget || !currentTarget || relatedTarget.offsetParent !== currentTarget.offsetParent) {
71
- _this.setState({
72
- showKeypad: false
73
- });
74
- }
75
- });
70
+ _this.state = {
71
+ showKeypad: true
72
+ };
73
+ _this.mathToolBarId = "math-toolbar-".concat(new Date().getTime());
76
74
  return _this;
77
75
  }
78
76
 
79
77
  (0, _createClass2["default"])(SimpleQuestionBlockRaw, [{
78
+ key: "componentDidMount",
79
+ value: function componentDidMount() {
80
+ window.addEventListener('click', this.handleClick);
81
+ }
82
+ }, {
83
+ key: "componentWillUnmount",
84
+ value: function componentWillUnmount() {
85
+ window.removeEventListener('click', this.handleClick);
86
+ }
87
+ }, {
80
88
  key: "render",
81
89
  value: function render() {
82
90
  var _cx;
@@ -89,28 +97,27 @@ var SimpleQuestionBlockRaw = /*#__PURE__*/function (_React$Component) {
89
97
  emptyResponse = _this$props.emptyResponse,
90
98
  onSimpleResponseChange = _this$props.onSimpleResponseChange;
91
99
 
92
- var _ref2 = model || {},
93
- config = _ref2.config,
94
- disabled = _ref2.disabled,
95
- correctness = _ref2.correctness,
96
- view = _ref2.view;
100
+ var _ref = model || {},
101
+ config = _ref.config,
102
+ disabled = _ref.disabled,
103
+ correctness = _ref.correctness;
97
104
 
98
105
  if (!config) {
99
106
  return;
100
107
  }
101
108
 
102
109
  var correct = correctness && correctness.correct;
103
- var showAsCorrect = !emptyResponse && (showCorrect || correct);
104
- var showAsIncorrect = !emptyResponse && !correct && !showCorrect && !view;
105
110
  var responses = config.responses,
106
111
  equationEditor = config.equationEditor;
107
112
  return /*#__PURE__*/_react["default"].createElement("div", {
108
113
  className: classes.expression
109
114
  }, showCorrect || disabled ? /*#__PURE__*/_react["default"].createElement("div", {
110
- className: (0, _classnames["default"])(classes["static"], (_cx = {}, (0, _defineProperty2["default"])(_cx, classes.correct, showAsCorrect), (0, _defineProperty2["default"])(_cx, classes.incorrect, showAsIncorrect), _cx))
115
+ className: (0, _classnames["default"])(classes["static"], (_cx = {}, (0, _defineProperty2["default"])(_cx, classes.incorrect, !emptyResponse && !correct && !showCorrect), (0, _defineProperty2["default"])(_cx, classes.correct, !emptyResponse && (correct || showCorrect)), _cx))
111
116
  }, /*#__PURE__*/_react["default"].createElement(_mathInput.mq.Static, {
112
117
  latex: showCorrect ? responses && responses.length && responses[0].answer : session.response || ''
113
- })) : /*#__PURE__*/_react["default"].createElement(_mathToolbar.MathToolbar, {
118
+ })) : /*#__PURE__*/_react["default"].createElement("div", {
119
+ id: this.mathToolBarId
120
+ }, /*#__PURE__*/_react["default"].createElement(_mathToolbar.MathToolbar, {
114
121
  classNames: {
115
122
  editor: classes.responseEditor
116
123
  },
@@ -119,11 +126,10 @@ var SimpleQuestionBlockRaw = /*#__PURE__*/function (_React$Component) {
119
126
  onChange: onSimpleResponseChange,
120
127
  onDone: function onDone() {},
121
128
  onFocus: this.onFocus,
122
- onBlur: this.onBlur,
123
129
  controlledKeypad: true,
124
130
  showKeypad: this.state.showKeypad,
125
131
  hideDoneButton: true
126
- }));
132
+ })));
127
133
  }
128
134
  }]);
129
135
  return SimpleQuestionBlockRaw;
@@ -144,8 +150,7 @@ var SimpleQuestionBlock = (0, _styles.withStyles)(function (theme) {
144
150
  display: 'flex',
145
151
  justifyContent: 'center',
146
152
  width: 'auto',
147
- minWidth: '500px',
148
- maxWidth: '900px',
153
+ maxWidth: 'fit-content',
149
154
  height: 'auto',
150
155
  textAlign: 'left',
151
156
  padding: theme.spacing.unit,
@@ -162,7 +167,7 @@ var SimpleQuestionBlock = (0, _styles.withStyles)(function (theme) {
162
167
  color: _renderUi.color.text(),
163
168
  background: _renderUi.color.background(),
164
169
  border: "1px solid ".concat(_renderUi.color.primaryLight()),
165
- width: '100%',
170
+ width: 'fit-content',
166
171
  fontSize: '1rem',
167
172
  padding: theme.spacing.unit / 2,
168
173
  '& > .mq-math-mode': {
@@ -174,12 +179,14 @@ var SimpleQuestionBlock = (0, _styles.withStyles)(function (theme) {
174
179
  }
175
180
  },
176
181
  correct: {
177
- color: _renderUi.color.correct(),
178
- border: "1px solid ".concat(_renderUi.color.correct(), " !important")
182
+ border: "2px solid ".concat(_renderUi.color.correct(), " !important"),
183
+ padding: theme.spacing.unit,
184
+ letterSpacing: '0.5px'
179
185
  },
180
186
  incorrect: {
181
- color: _renderUi.color.incorrect(),
182
- border: "1px solid ".concat(_renderUi.color.incorrect(), " !important")
187
+ border: "2px solid ".concat(_renderUi.color.incorrect(), " !important"),
188
+ padding: theme.spacing.unit,
189
+ letterSpacing: '0.5px'
183
190
  }
184
191
  };
185
192
  })(SimpleQuestionBlockRaw);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/simple-question-block.jsx"],"names":["SimpleQuestionBlockRaw","showKeypad","setState","e","relatedTarget","currentTarget","offsetParent","props","classes","model","showCorrect","session","emptyResponse","onSimpleResponseChange","config","disabled","correctness","view","correct","showAsCorrect","showAsIncorrect","responses","equationEditor","expression","incorrect","length","answer","response","editor","responseEditor","onFocus","onBlur","state","React","Component","PropTypes","object","func","isRequired","bool","SimpleQuestionBlock","theme","display","justifyContent","width","minWidth","maxWidth","height","textAlign","padding","spacing","unit","border","color","primaryLight","marginTop","marginBottom","text","background","fontSize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,sB;;;;;;;;;;;;;;;8FAUH;AACNC,MAAAA,UAAU,EAAE;AADN,K;gGAIE;AAAA,aAAM,MAAKC,QAAL,CAAc;AAAED,QAAAA,UAAU,EAAE;AAAd,OAAd,CAAN;AAAA,K;+FAED,UAACE,CAAD,EAAO;AACd,iBAAyCA,CAAC,IAAI,EAA9C;AAAA,UAAQC,aAAR,QAAQA,aAAR;AAAA,UAAuBC,aAAvB,QAAuBA,aAAvB;;AAEA,UAAI,CAACD,aAAD,IAAkB,CAACC,aAAnB,IAAqCD,aAAa,CAACE,YAAd,KAA+BD,aAAa,CAACC,YAAtF,EAAqG;AACnG,cAAKJ,QAAL,CAAc;AAAED,UAAAA,UAAU,EAAE;AAAd,SAAd;AACD;AACF,K;;;;;;WAED,kBAAS;AAAA;;AACP,wBAOI,KAAKM,KAPT;AAAA,UACEC,OADF,eACEA,OADF;AAAA,UAEEC,KAFF,eAEEA,KAFF;AAAA,UAGEC,WAHF,eAGEA,WAHF;AAAA,UAIEC,OAJF,eAIEA,OAJF;AAAA,UAKEC,aALF,eAKEA,aALF;AAAA,UAMEC,sBANF,eAMEA,sBANF;;AAQA,kBAAgDJ,KAAK,IAAI,EAAzD;AAAA,UAAQK,MAAR,SAAQA,MAAR;AAAA,UAAgBC,QAAhB,SAAgBA,QAAhB;AAAA,UAA0BC,WAA1B,SAA0BA,WAA1B;AAAA,UAAuCC,IAAvC,SAAuCA,IAAvC;;AAEA,UAAI,CAACH,MAAL,EAAa;AACX;AACD;;AAED,UAAMI,OAAO,GAAGF,WAAW,IAAIA,WAAW,CAACE,OAA3C;AACA,UAAMC,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C,IAAd,GAAqB,CANxB;AAON,2BAAqB;AACnB,6BAAqB;AACnB,4BAAkB;AAChBT,YAAAA,OAAO,EAAE;AADO;AADC;AADF;AAPf,KAnBuC;AAkC/CxB,IAAAA,OAAO,EAAE;AACPmC,MAAAA,KAAK,EAAEA,gBAAMnC,OAAN,EADA;AAEPkC,MAAAA,MAAM,sBAAeC,gBAAMnC,OAAN,EAAf;AAFC,KAlCsC;AAsC/CM,IAAAA,SAAS,EAAE;AACT6B,MAAAA,KAAK,EAAEA,gBAAM7B,SAAN,EADE;AAET4B,MAAAA,MAAM,sBAAeC,gBAAM7B,SAAN,EAAf;AAFG;AAtCoC,GAAL;AAAA,CAAhB,EA0CxBxB,sBA1CwB,CAA5B;eA4CewC,mB","sourcesContent":["import React from 'react';\nimport { MathToolbar } from '@pie-lib/math-toolbar';\nimport { mq } from '@pie-lib/math-input';\nimport cx from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\nimport { color } from '@pie-lib/render-ui';\n\nexport class SimpleQuestionBlockRaw extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n onSimpleResponseChange: PropTypes.func,\n model: PropTypes.object.isRequired,\n emptyResponse: PropTypes.bool,\n session: PropTypes.object.isRequired,\n showCorrect: PropTypes.bool\n };\n\n state = {\n showKeypad: true\n };\n\n onFocus = () => this.setState({ showKeypad: true });\n\n onBlur = (e) => {\n const { relatedTarget, currentTarget } = e || {};\n\n if (!relatedTarget || !currentTarget || (relatedTarget.offsetParent !== currentTarget.offsetParent)) {\n this.setState({ showKeypad: false });\n }\n };\n\n render() {\n const {\n classes,\n model,\n showCorrect,\n session,\n emptyResponse,\n onSimpleResponseChange\n } = this.props;\n const { config, disabled, correctness, view } = model || {};\n\n if (!config) {\n return;\n }\n\n const correct = correctness && correctness.correct;\n const showAsCorrect = !emptyResponse && (showCorrect || correct);\n const showAsIncorrect = !emptyResponse && !correct && !showCorrect && !view;\n const { responses, equationEditor } = config;\n\n return (\n <div className={classes.expression}>\n {showCorrect || disabled ? (\n <div\n className={cx(classes.static, {\n [classes.correct]: showAsCorrect,\n [classes.incorrect]: showAsIncorrect\n })}\n >\n <mq.Static\n latex={\n showCorrect ? (responses && responses.length && responses[0].answer) : (session.response || '')\n }\n />\n </div>\n ) : (\n <MathToolbar\n classNames={{ editor: classes.responseEditor }}\n latex={session.response || ''}\n keypadMode={equationEditor}\n onChange={onSimpleResponseChange}\n onDone={() => {}}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n controlledKeypad={true}\n showKeypad={this.state.showKeypad}\n hideDoneButton={true}\n />\n )}\n </div>\n );\n }\n}\nconst SimpleQuestionBlock = withStyles(theme => ({\n responseEditor: {\n display: 'flex',\n justifyContent: 'center',\n width: 'auto',\n minWidth: '500px',\n maxWidth: '900px',\n height: 'auto',\n textAlign: 'left',\n padding: theme.spacing.unit,\n '&.mq-math-mode': {\n border: `1px solid ${color.primaryLight()}`\n }\n },\n expression: {\n marginTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n padding: theme.spacing.unit\n },\n static: {\n color: color.text(),\n background: color.background(),\n border: `1px solid ${color.primaryLight()}`,\n width: '100%',\n fontSize: '1rem',\n padding: theme.spacing.unit / 2,\n '& > .mq-math-mode': {\n '& > .mq-hasCursor': {\n '& > .mq-cursor': {\n display: 'none'\n }\n }\n }\n },\n correct: {\n color: color.correct(),\n border: `1px solid ${color.correct()} !important`,\n },\n incorrect: {\n color: color.incorrect(),\n border: `1px solid ${color.incorrect()} !important`,\n }\n}))(SimpleQuestionBlockRaw);\n\nexport default SimpleQuestionBlock;\n"],"file":"simple-question-block.js"}
1
+ {"version":3,"sources":["../src/simple-question-block.jsx"],"names":["SimpleQuestionBlockRaw","props","e","document","getElementById","mathToolBarId","contains","target","mathToolBarContainsTarget","setState","showKeypad","state","Date","getTime","window","addEventListener","handleClick","removeEventListener","classes","model","showCorrect","session","emptyResponse","onSimpleResponseChange","config","disabled","correctness","correct","responses","equationEditor","expression","incorrect","length","answer","response","editor","responseEditor","onFocus","React","Component","PropTypes","object","func","isRequired","bool","SimpleQuestionBlock","theme","display","justifyContent","width","maxWidth","height","textAlign","padding","spacing","unit","border","color","primaryLight","marginTop","marginBottom","text","background","fontSize","letterSpacing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,sB;;;;;AAUX,kCAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,kHAiBS,UAACC,CAAD;AAAA,aAAOC,QAAQ,CAACC,cAAT,CAAwB,MAAKC,aAA7B,EAA4CC,QAA5C,CAAqDJ,CAAC,CAACK,MAAvD,CAAP;AAAA,KAjBT;AAAA,oGAmBL,UAACL,CAAD,EAAO;AACnB,UAAI;AACF,YAAI,CAAC,MAAKM,yBAAL,CAA+BN,CAA/B,CAAL,EAAwC;AACtC,gBAAKO,QAAL,CAAc;AAAEC,YAAAA,UAAU,EAAE;AAAd,WAAd;AACD;AACF,OAJD,CAIE,OAAOR,CAAP,EAAU,CACV;AACD;AACF,KA3BkB;AAAA,gGA6BT;AAAA,aAAM,MAAKO,QAAL,CAAc;AAAEC,QAAAA,UAAU,EAAE;AAAd,OAAd,CAAN;AAAA,KA7BS;AAGjB,UAAKC,KAAL,GAAa;AACXD,MAAAA,UAAU,EAAE;AADD,KAAb;AAGA,UAAKL,aAAL,0BAAqC,IAAIO,IAAJ,GAAWC,OAAX,EAArC;AANiB;AAOlB;;;;WAED,6BAAoB;AAClBC,MAAAA,MAAM,CAACC,gBAAP,CAAwB,OAAxB,EAAiC,KAAKC,WAAtC;AACD;;;WAED,gCAAuB;AACrBF,MAAAA,MAAM,CAACG,mBAAP,CAA2B,OAA3B,EAAoC,KAAKD,WAAzC;AACD;;;WAgBD,kBAAS;AAAA;;AACP,wBAAwF,KAAKf,KAA7F;AAAA,UAAQiB,OAAR,eAAQA,OAAR;AAAA,UAAiBC,KAAjB,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P,KAAK,CAACQ,OAAN,CAAcC;AAHb,KAbqC;AAkBjD,cAAQ;AACNE,MAAAA,KAAK,EAAEA,gBAAMI,IAAN,EADD;AAENC,MAAAA,UAAU,EAAEL,gBAAMK,UAAN,EAFN;AAGNN,MAAAA,MAAM,sBAAeC,gBAAMC,YAAN,EAAf,CAHA;AAINT,MAAAA,KAAK,EAAE,aAJD;AAKNc,MAAAA,QAAQ,EAAE,MALJ;AAMNV,MAAAA,OAAO,EAAEP,KAAK,CAACQ,OAAN,CAAcC,IAAd,GAAqB,CANxB;AAON,2BAAqB;AACnB,6BAAqB;AACnB,4BAAkB;AAChBR,YAAAA,OAAO,EAAE;AADO;AADC;AADF;AAPf,KAlByC;AAiCjDpB,IAAAA,OAAO,EAAE;AACP6B,MAAAA,MAAM,sBAAeC,gBAAM9B,OAAN,EAAf,gBADC;AAEP0B,MAAAA,OAAO,EAAEP,KAAK,CAACQ,OAAN,CAAcC,IAFhB;AAGPS,MAAAA,aAAa,EAAE;AAHR,KAjCwC;AAsCjDjC,IAAAA,SAAS,EAAE;AACTyB,MAAAA,MAAM,sBAAeC,gBAAM1B,SAAN,EAAf,gBADG;AAETsB,MAAAA,OAAO,EAAEP,KAAK,CAACQ,OAAN,CAAcC,IAFd;AAGTS,MAAAA,aAAa,EAAE;AAHN;AAtCsC,GAAZ;AAAA,CAAX,EA2CxBhE,sBA3CwB,CAA5B;eA6Ce6C,mB","sourcesContent":["import React from 'react';\nimport { MathToolbar } from '@pie-lib/math-toolbar';\nimport { mq } from '@pie-lib/math-input';\nimport cx from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\nimport { color } from '@pie-lib/render-ui';\n\nexport class SimpleQuestionBlockRaw extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n onSimpleResponseChange: PropTypes.func,\n model: PropTypes.object.isRequired,\n emptyResponse: PropTypes.bool,\n session: PropTypes.object.isRequired,\n showCorrect: PropTypes.bool,\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n showKeypad: true,\n };\n this.mathToolBarId = `math-toolbar-${new Date().getTime()}`;\n }\n\n componentDidMount() {\n window.addEventListener('click', this.handleClick);\n }\n\n componentWillUnmount() {\n window.removeEventListener('click', this.handleClick);\n }\n\n mathToolBarContainsTarget = (e) => document.getElementById(this.mathToolBarId).contains(e.target);\n\n handleClick = (e) => {\n try {\n if (!this.mathToolBarContainsTarget(e)) {\n this.setState({ showKeypad: false });\n }\n } catch (e) {\n // console.log(e.toString());\n }\n };\n\n onFocus = () => this.setState({ showKeypad: true });\n\n render() {\n const { classes, model, showCorrect, session, emptyResponse, onSimpleResponseChange } = this.props;\n const { config, disabled, correctness } = model || {};\n\n if (!config) {\n return;\n }\n\n const correct = correctness && correctness.correct;\n const { responses, equationEditor } = config;\n\n return (\n <div className={classes.expression}>\n {showCorrect || disabled ? (\n <div\n className={cx(classes.static, {\n [classes.incorrect]: !emptyResponse && !correct && !showCorrect,\n [classes.correct]: !emptyResponse && (correct || showCorrect),\n })}\n >\n <mq.Static\n latex={showCorrect ? responses && responses.length && responses[0].answer : session.response || ''}\n />\n </div>\n ) : (\n <div id={this.mathToolBarId}>\n <MathToolbar\n classNames={{ editor: classes.responseEditor }}\n latex={session.response || ''}\n keypadMode={equationEditor}\n onChange={onSimpleResponseChange}\n onDone={() => {}}\n onFocus={this.onFocus}\n controlledKeypad={true}\n showKeypad={this.state.showKeypad}\n hideDoneButton={true}\n />\n </div>\n )}\n </div>\n );\n }\n}\n\nconst SimpleQuestionBlock = withStyles((theme) => ({\n responseEditor: {\n display: 'flex',\n justifyContent: 'center',\n width: 'auto',\n maxWidth: 'fit-content',\n height: 'auto',\n textAlign: 'left',\n padding: theme.spacing.unit,\n '&.mq-math-mode': {\n border: `1px solid ${color.primaryLight()}`,\n },\n },\n expression: {\n marginTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n padding: theme.spacing.unit,\n },\n static: {\n color: color.text(),\n background: color.background(),\n border: `1px solid ${color.primaryLight()}`,\n width: 'fit-content',\n fontSize: '1rem',\n padding: theme.spacing.unit / 2,\n '& > .mq-math-mode': {\n '& > .mq-hasCursor': {\n '& > .mq-cursor': {\n display: 'none',\n },\n },\n },\n },\n correct: {\n border: `2px solid ${color.correct()} !important`,\n padding: theme.spacing.unit,\n letterSpacing: '0.5px',\n },\n incorrect: {\n border: `2px solid ${color.incorrect()} !important`,\n padding: theme.spacing.unit,\n letterSpacing: '0.5px',\n },\n}))(SimpleQuestionBlockRaw);\n\nexport default SimpleQuestionBlock;\n"],"file":"simple-question-block.js"}
package/lib/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils.js"],"names":["ResponseTypes","advanced","simple"],"mappings":";;;;;;AAAO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,QAAQ,EAAE,gBADiB;AAE3BC,EAAAA,MAAM,EAAE;AAFmB,CAAtB","sourcesContent":["export const ResponseTypes = {\n advanced: 'Advanced Multi',\n simple: 'Simple'\n};\n"],"file":"utils.js"}
1
+ {"version":3,"sources":["../src/utils.js"],"names":["ResponseTypes","advanced","simple"],"mappings":";;;;;;AAAO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,QAAQ,EAAE,gBADiB;AAE3BC,EAAAA,MAAM,EAAE;AAFmB,CAAtB","sourcesContent":["export const ResponseTypes = {\n advanced: 'Advanced Multi',\n simple: 'Simple',\n};\n"],"file":"utils.js"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "5.9.0",
7
+ "version": "5.9.1-beta.1443+449763c04",
8
8
  "main": "lib/index.js",
9
9
  "description": "",
10
10
  "scripts": {
@@ -13,12 +13,12 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@material-ui/core": "^3.9.2",
16
- "@pie-framework/mathquill": "^1.1.0",
16
+ "@pie-framework/mathquill": "^1.1.3",
17
17
  "@pie-framework/pie-player-events": "^0.1.0",
18
- "@pie-lib/correct-answer-toggle": "^2.3.34",
19
- "@pie-lib/math-input": "^6.6.7",
20
- "@pie-lib/math-toolbar": "^1.8.7",
21
- "@pie-lib/render-ui": "^4.12.4",
18
+ "@pie-lib/correct-answer-toggle": "^2.3.62",
19
+ "@pie-lib/math-input": "^6.10.12",
20
+ "@pie-lib/math-toolbar": "2.0.0-beta.2",
21
+ "@pie-lib/render-ui": "^4.14.12",
22
22
  "classnames": "^2.2.5",
23
23
  "debug": "^4.1.1",
24
24
  "lodash": "^4.17.10",
@@ -28,6 +28,10 @@
28
28
  },
29
29
  "author": "",
30
30
  "license": "ISC",
31
- "gitHead": "510db2949732b8997ff2e1a496ca1a7bd3973088",
32
- "module": "src/index.js"
31
+ "gitHead": "449763c046b78327513c38ea5367b8d4da120760",
32
+ "module": "src/index.js",
33
+ "exports": {
34
+ ".": "./src/index.js",
35
+ "./print": "./src/print.js"
36
+ }
33
37
  }