@pie-element/explicit-constructed-response 6.5.0 → 6.5.1-next.14

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.
@@ -8,7 +8,7 @@
8
8
  "@material-ui/core": "^3.9.2",
9
9
  "@material-ui/icons": "^3.0.1",
10
10
  "@pie-framework/pie-configure-events": "^1.3.0",
11
- "@pie-lib/pie-toolbox": "1.9.0",
11
+ "@pie-lib/pie-toolbox": "1.10.0",
12
12
  "classnames": "^2.2.6",
13
13
  "debug": "^3.1.0",
14
14
  "lodash": "^4.17.15",
@@ -8,7 +8,7 @@
8
8
  "author": "",
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
- "@pie-lib/pie-toolbox": "1.9.0",
11
+ "@pie-lib/pie-toolbox": "1.10.0",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15",
14
14
  "type-of": "^2.0.1"
package/lib/index.js CHANGED
@@ -29,7 +29,7 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
29
29
 
30
30
  var _piePlayerEvents = require("@pie-framework/pie-player-events");
31
31
 
32
- var _mathRendering = require("@pie-lib/pie-toolbox/math-rendering");
32
+ var _mathRenderingAccessible = require("@pie-lib/pie-toolbox/math-rendering-accessible");
33
33
 
34
34
  var _main = _interopRequireDefault(require("./main"));
35
35
 
@@ -71,7 +71,7 @@ var InlineDropdown = /*#__PURE__*/function (_HTMLElement) {
71
71
  });
72
72
 
73
73
  _reactDom["default"].render(elem, (0, _assertThisInitialized2["default"])(_this), function () {
74
- (0, _mathRendering.renderMath)((0, _assertThisInitialized2["default"])(_this));
74
+ (0, _mathRenderingAccessible.renderMath)((0, _assertThisInitialized2["default"])(_this));
75
75
  });
76
76
  }
77
77
  });
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["InlineDropdown","_model","_session","elem","React","createElement","Main","teacherInstructions","prompt","note","showNote","env","rationale","disabled","choices","markup","mode","maxLengthPerChoice","maxLengthPerChoiceEnabled","playerSpellCheckEnabled","value","feedback","displayType","language","onChange","changeSession","ReactDOM","render","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","session","dispatchChangedEvent","_render","m","ModelSetEvent","s","setAttribute","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;;;;;IAEqBA,c;;;;;AACnB,4BAAc;AAAA;;AAAA;AACZ;AADY,gGAwBJ,YAAM;AACd,UAAI,MAAKC,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAIC,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCC,UAAAA,mBAAmB,EAAE,MAAKN,MAAL,CAAYM,mBADE;AAEnCC,UAAAA,MAAM,EAAE,MAAKP,MAAL,CAAYO,MAFe;AAGnCC,UAAAA,IAAI,EAAE,MAAKR,MAAL,CAAYQ,IAHiB;AAInCC,UAAAA,QAAQ,EAAE,MAAKT,MAAL,CAAYS,QAJa;AAKnCC,UAAAA,GAAG,EAAE,MAAKV,MAAL,CAAYU,GALkB;AAMnCC,UAAAA,SAAS,EAAE,MAAKX,MAAL,CAAYW,SANY;AAOnCC,UAAAA,QAAQ,EAAE,MAAKZ,MAAL,CAAYY,QAPa;AAQnCC,UAAAA,OAAO,EAAE,MAAKb,MAAL,CAAYa,OARc;AASnCC,UAAAA,MAAM,EAAE,MAAKd,MAAL,CAAYc,MATe;AAUnCC,UAAAA,IAAI,EAAE,MAAKf,MAAL,CAAYe,IAViB;AAWnCC,UAAAA,kBAAkB,EAAE,MAAKhB,MAAL,CAAYgB,kBAXG;AAYnCC,UAAAA,yBAAyB,EAAE,MAAKjB,MAAL,CAAYiB,yBAZJ;AAanCC,UAAAA,uBAAuB,EAAE,MAAKlB,MAAL,CAAYkB,uBAbF;AAcnCC,UAAAA,KAAK,EAAE,MAAKlB,QAAL,CAAckB,KAdc;AAenCC,UAAAA,QAAQ,EAAE,MA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,WAAKJ,OAAL;AACD;;;kDArEyCK,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering';\n\nimport Main from './main';\n\nexport default class InlineDropdown extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(\n new ModelSetEvent(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model),\n );\n\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n _render = () => {\n if (this._model && this._session) {\n let elem = React.createElement(Main, {\n teacherInstructions: this._model.teacherInstructions,\n prompt: this._model.prompt,\n note: this._model.note,\n showNote: this._model.showNote,\n env: this._model.env,\n rationale: this._model.rationale,\n disabled: this._model.disabled,\n choices: this._model.choices,\n markup: this._model.markup,\n mode: this._model.mode,\n maxLengthPerChoice: this._model.maxLengthPerChoice,\n maxLengthPerChoiceEnabled: this._model.maxLengthPerChoiceEnabled,\n playerSpellCheckEnabled: this._model.playerSpellCheckEnabled,\n value: this._session.value,\n feedback: this._model.feedback,\n displayType: this._model.displayType,\n language: this._model.language,\n onChange: this.changeSession,\n });\n\n ReactDOM.render(elem, this, () => {\n renderMath(this);\n });\n }\n };\n\n dispatchChangedEvent = () => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.session && !!this.session.value));\n };\n\n changeSession = (value) => {\n this.session.value = value;\n this.dispatchChangedEvent();\n this._render();\n };\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Fill in the Blank Question');\n this.setAttribute('role', 'region');\n\n this._render();\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["InlineDropdown","_model","_session","elem","React","createElement","Main","teacherInstructions","prompt","note","showNote","env","rationale","disabled","choices","markup","mode","maxLengthPerChoice","maxLengthPerChoiceEnabled","playerSpellCheckEnabled","value","feedback","displayType","language","onChange","changeSession","ReactDOM","render","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","session","dispatchChangedEvent","_render","m","ModelSetEvent","s","setAttribute","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;;;;;IAEqBA,c;;;;;AACnB,4BAAc;AAAA;;AAAA;AACZ;AADY,gGAwBJ,YAAM;AACd,UAAI,MAAKC,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAIC,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCC,UAAAA,mBAAmB,EAAE,MAAKN,MAAL,CAAYM,mBADE;AAEnCC,UAAAA,MAAM,EAAE,MAAKP,MAAL,CAAYO,MAFe;AAGnCC,UAAAA,IAAI,EAAE,MAAKR,MAAL,CAAYQ,IAHiB;AAInCC,UAAAA,QAAQ,EAAE,MAAKT,MAAL,CAAYS,QAJa;AAKnCC,UAAAA,GAAG,EAAE,MAAKV,MAAL,CAAYU,GALkB;AAMnCC,UAAAA,SAAS,EAAE,MAAKX,MAAL,CAAYW,SANY;AAOnCC,UAAAA,QAAQ,EAAE,MAAKZ,MAAL,CAAYY,QAPa;AAQnCC,UAAAA,OAAO,EAAE,MAAKb,MAAL,CAAYa,OARc;AASnCC,UAAAA,MAAM,EAAE,MAAKd,MAAL,CAAYc,MATe;AAUnCC,UAAAA,IAAI,EAAE,MAAKf,MAAL,CAAYe,IAViB;AAWnCC,UAAAA,kBAAkB,EAAE,MAAKhB,MAAL,CAAYgB,kBAXG;AAYnCC,UAAAA,yBAAyB,EAAE,MAAKjB,MAAL,CAAYiB,yBAZJ;AAanCC,UAAAA,uBAAuB,EAAE,MAAKlB,MAAL,CAAYkB,uBAbF;AAcnCC,UAAAA,KAAK,EAAE,MAAKlB,QAAL,CAAckB,KAdc;AAenCC,UAAAA,QAAQ,EAAE,MAAKpB,MAAL,CAAYoB,QA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kDArEyCK,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';\n\nimport Main from './main';\n\nexport default class InlineDropdown extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(\n new ModelSetEvent(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model),\n );\n\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n _render = () => {\n if (this._model && this._session) {\n let elem = React.createElement(Main, {\n teacherInstructions: this._model.teacherInstructions,\n prompt: this._model.prompt,\n note: this._model.note,\n showNote: this._model.showNote,\n env: this._model.env,\n rationale: this._model.rationale,\n disabled: this._model.disabled,\n choices: this._model.choices,\n markup: this._model.markup,\n mode: this._model.mode,\n maxLengthPerChoice: this._model.maxLengthPerChoice,\n maxLengthPerChoiceEnabled: this._model.maxLengthPerChoiceEnabled,\n playerSpellCheckEnabled: this._model.playerSpellCheckEnabled,\n value: this._session.value,\n feedback: this._model.feedback,\n displayType: this._model.displayType,\n language: this._model.language,\n onChange: this.changeSession,\n });\n\n ReactDOM.render(elem, this, () => {\n renderMath(this);\n });\n }\n };\n\n dispatchChangedEvent = () => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.session && !!this.session.value));\n };\n\n changeSession = (value) => {\n this.session.value = value;\n this.dispatchChangedEvent();\n this._render();\n };\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Fill in the Blank Question');\n this.setAttribute('role', 'region');\n\n this._render();\n }\n}\n"],"file":"index.js"}
package/lib/print.js CHANGED
@@ -31,7 +31,7 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
31
31
 
32
32
  var _main = _interopRequireDefault(require("./main"));
33
33
 
34
- var _mathRendering = require("@pie-lib/pie-toolbox/math-rendering");
34
+ var _mathRenderingAccessible = require("@pie-lib/pie-toolbox/math-rendering-accessible");
35
35
 
36
36
  var _debug = _interopRequireDefault(require("debug"));
37
37
 
@@ -80,7 +80,7 @@ var ExplicitConstructedResponsePrint = /*#__PURE__*/function (_HTMLElement) {
80
80
 
81
81
  _reactDom["default"].render(element, (0, _assertThisInitialized2["default"])(_this), function () {
82
82
  log('render complete - render math');
83
- (0, _mathRendering.renderMath)((0, _assertThisInitialized2["default"])(_this));
83
+ (0, _mathRenderingAccessible.renderMath)((0, _assertThisInitialized2["default"])(_this));
84
84
  });
85
85
  } else {
86
86
  log('skip');
package/lib/print.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/print.js"],"names":["log","preparePrintModel","model","opts","instr","role","prompt","promptEnabled","undefined","teacherInstructions","teacherInstructionsEnabled","rationale","rationaleEnabled","alwaysShowCorrect","mode","disabled","animationsDisabled","ExplicitConstructedResponsePrint","_options","_model","_session","_rerender","printModel","element","React","createElement","Main","onChange","ReactDOM","render","leading","trailing","o","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,iDAAN,CAAZ;;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,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;WAED,6BAAoB,CAAE;;;kDAvCsCa,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/pie-toolbox/math-rendering';\nimport debug from 'debug';\n\nconst log = debug('pie-element:explicit-constructed-response:print');\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\n model.alwaysShowCorrect = instr;\n model.mode = instr ? 'evaluate' : model.mode;\n\n model.disabled = true;\n model.animationsDisabled = true;\n\n return model;\n};\n\nexport default class ExplicitConstructedResponsePrint 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 ...printModel,\n onChange: () => {},\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"}
1
+ {"version":3,"sources":["../src/print.js"],"names":["log","preparePrintModel","model","opts","instr","role","prompt","promptEnabled","undefined","teacherInstructions","teacherInstructionsEnabled","rationale","rationaleEnabled","alwaysShowCorrect","mode","disabled","animationsDisabled","ExplicitConstructedResponsePrint","_options","_model","_session","_rerender","printModel","element","React","createElement","Main","onChange","ReactDOM","render","leading","trailing","o","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uB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CAAE;AAFpB,WAFF;;AAOAC,6BAASC,MAAT,CAAgBN,OAAhB,kDAA+B,YAAM;AACnCvB,UAAAA,GAAG,CAAC,+BAAD,CAAH;AACA;AACD,SAHD;AAID,OAdD,MAcO;AACLA,QAAAA,GAAG,CAAC,MAAD,CAAH;AACD;AACF,KAnBc,EAoBf,EApBe,EAqBf;AAAE8B,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;;;kDAvCsCa,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/pie-toolbox/math-rendering-accessible';\nimport debug from 'debug';\n\nconst log = debug('pie-element:explicit-constructed-response:print');\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\n model.alwaysShowCorrect = instr;\n model.mode = instr ? 'evaluate' : model.mode;\n\n model.disabled = true;\n model.animationsDisabled = true;\n\n return model;\n};\n\nexport default class ExplicitConstructedResponsePrint 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 ...printModel,\n onChange: () => {},\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"}
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.1.6/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.3.0/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@4.0.0/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {