@pie-element/select-text 6.5.22 → 6.5.23

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
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.5.23](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.22...@pie-element/select-text@6.5.23) (2022-03-08)
7
+
8
+ **Note:** Version bump only for package @pie-element/select-text
9
+
10
+
11
+
12
+
13
+
6
14
  ## [6.5.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.21...@pie-element/select-text@6.5.22) (2022-02-21)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/select-text
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.2.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.18...@pie-element/select-text-configure@5.2.19) (2022-03-08)
7
+
8
+ **Note:** Version bump only for package @pie-element/select-text-configure
9
+
10
+
11
+
12
+
13
+
6
14
  ## [5.2.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.17...@pie-element/select-text-configure@5.2.18) (2022-02-21)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/select-text-configure
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@pie-element/select-text-configure",
3
3
  "private": true,
4
- "version": "5.2.18",
4
+ "version": "5.2.19",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
10
  "@pie-framework/pie-configure-events": "^1.2.0",
11
- "@pie-lib/config-ui": "^10.10.20",
12
- "@pie-lib/editable-html": "^7.18.0",
13
- "@pie-lib/scoring-config": "^3.5.149",
11
+ "@pie-lib/config-ui": "^10.10.22",
12
+ "@pie-lib/editable-html": "^7.19.1",
13
+ "@pie-lib/scoring-config": "^3.5.151",
14
14
  "@pie-lib/text-select": "^1.8.13",
15
15
  "debug": "^3.1.0",
16
16
  "lodash": "^4.17.15",
package/lib/print.js CHANGED
@@ -50,6 +50,7 @@ var preparePrintModel = function preparePrintModel(model, opts) {
50
50
  var instr = opts.role === 'instructor';
51
51
  model.prompt = model.promptEnabled !== false ? model.prompt : undefined;
52
52
  model.teacherInstructions = instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;
53
+ model.rationale = instr && model.rationaleEnabled !== false ? model.rationale : undefined;
53
54
  model.showTeacherInstructions = instr;
54
55
  model.alwaysShowCorrect = instr;
55
56
  model.mode = instr ? 'evaluate' : model.mode;
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","showTeacherInstructions","alwaysShowCorrect","mode","disabled","animationsDisabled","highlightChoices","feedback","SelectTextPrint","_options","_model","_session","selectedTokens","_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,GAA4BL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nBc,EAoBf,EApBe,EAqBf;AAAEgC,MAAAA,OAAO,EAAE,KAAX;AAAkBC,MAAAA,QAAQ,EAAE;AAA5B,KArBe,CAAjB;AANY;AA6Bb;;;;SACD,aAAYC,CAAZ,EAAe;AACb,WAAKf,QAAL,GAAgBe,CAAhB;AACD;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKf,MAAL,GAAce,CAAd;;AACA,WAAKZ,SAAL;AACD;;;WAED,6BAAoB,CAAE;;;kDAxCqBa,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:select-text: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 = instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;\n model.showTeacherInstructions = instr;\n model.alwaysShowCorrect = instr;\n model.mode = instr ? 'evaluate' : model.mode;\n\n model.disabled = true;\n model.animationsDisabled = true;\n model.highlightChoices = true;\n model.feedback = undefined;\n\n return model;\n};\n\nexport default class SelectTextPrint extends HTMLElement {\n constructor() {\n super();\n this._options = null;\n this._model = null;\n this._session = {};\n this._session.selectedTokens = [];\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: { selectedTokens: [] }\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","showTeacherInstructions","alwaysShowCorrect","mode","disabled","animationsDisabled","highlightChoices","feedback","SelectTextPrint","_options","_model","_session","selectedTokens","_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,GAA4BL,KAAK,IAAIF,KAAK,CAACQ,0BAAN,KAAqC,KAA9C,GAAsDR,KAAK,CAACO,mBAA5D,GAAkFD,SAA9G;AACAN,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,IAAN,GAAaX,KAAK,GAAG,UAAH,GAAgBF,KAAK,CAACa,IAAxC;AAEAb,EAAAA,KAAK,CAACc,QAAN,GAAiB,IAAjB;AACAd,EAAAA,KAAK,CAACe,kBAAN,GAA2B,IAA3B;AACAf,EAAAA,KAAK,CAACgB,gBAAN,GAAyB,IAAzB;AACAhB,EAAAA,KAAK,CAACiB,QAAN,GAAiBX,SAAjB;AAEA,SAAON,KAAP;AACD,CAhBD;;IAkBqBkB,e;;;;;AACnB,6BAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,QAAL,GAAgB,IAAhB;AACA,UAAKC,MAAL,GAAc,IAAd;AACA,UAAKC,QAAL,GAAgB,EAAhB;AACA,UAAKA,QAAL,CAAcC,cAAd,GAA+B,EAA/B;AACA,UAAKC,SAAL,GAAiB,0BACf,YAAM;AACJ,UAAI,MAAKH,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAMG,UAAU,GAAGzB,iBAAiB,CAAC,MAAKqB,MAAN,EAAc,MAAKD,QAAnB,CAApC;;AAEA,YAAMM,OAAO,GACX,MAAKN,QAAL,iBACAO,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACxB5B,UAAAA,KAAK,EAAEwB,UADiB;AAExBK,UAAAA,OAAO,EAAE;AAAEP,YAAAA,cAAc,EAAE;AAAlB;AAFe,SAA1B,CAFF;;AAOAQ,6BAASC,MAAT,CAAgBN,OAAhB,kDAA+B,YAAM;AACnC3B,UAAAA,GAAG,CAAC,+BAAD,CAAH;AACA;AACD,SAHD;AAID,OAdD,MAcO;AACLA,QAAAA,GAAG,CAAC,MAAD,CAAH;AACD;AACF,KAnBc,EAoBf,EApBe,EAqBf;AAAEkC,MAAAA,OAAO,EAAE,KAAX;AAAkBC,MAAAA,QAAQ,EAAE;AAA5B,KArBe,CAAjB;AANY;AA6Bb;;;;SACD,aAAYC,CAAZ,EAAe;AACb,WAAKf,QAAL,GAAgBe,CAAhB;AACD;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKf,MAAL,GAAce,CAAd;;AACA,WAAKZ,SAAL;AACD;;;WAED,6BAAoB,CAAE;;;kDAxCqBa,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:select-text: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 = 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.mode = instr ? 'evaluate' : model.mode;\n\n model.disabled = true;\n model.animationsDisabled = true;\n model.highlightChoices = true;\n model.feedback = undefined;\n\n return model;\n};\n\nexport default class SelectTextPrint extends HTMLElement {\n constructor() {\n super();\n this._options = null;\n this._model = null;\n this._session = {};\n this._session.selectedTokens = [];\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: { selectedTokens: [] }\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,6 +1,6 @@
1
- import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_lodash, _dll_debug, _dll_classnames, _dll_pie_lib__render_ui, _dll_react_dom_server, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.3.1/module/index.js";
2
- import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.22/module/index.js";
3
- import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.22/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_lodash, _dll_debug, _dll_classnames, _dll_pie_lib__render_ui, _dll_react_dom_server, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.1/module/index.js";
2
+ import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.24/module/index.js";
3
+ import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.0/module/index.js";
4
4
  const React$7 = _dll_react;
5
5
  const PropTypes$6 = _dll_prop_types;
6
6
  const {Button: Button} = _dll_material_ui__core;
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_lodash, _dll_debug, _dll_classnames, _dll_pie_lib__render_ui, _dll_react_dom_server, _dll_pie_lib__correct_answer_toggle, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.3.1/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.24/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_lodash, _dll_debug, _dll_classnames, _dll_pie_lib__render_ui, _dll_react_dom_server, _dll_pie_lib__correct_answer_toggle, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.1/module/index.js";
2
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.26/module/index.js";
3
3
  var lib$1 = {};
4
4
  Object.defineProperty(lib$1, "__esModule", {
5
5
  value: true
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/select-text@6.5.21</title>
5
+ <title>@pie-element/select-text@6.5.22</title>
6
6
  <script
7
7
  type="module"
8
8
  src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@pie-element/select-text",
3
- "version": "6.5.21",
3
+ "version": "6.5.22",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/shared-module",
7
- "version": "^1.3.1"
7
+ "version": "^1.4.1"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/math-rendering-module",
11
- "version": "^1.0.24"
11
+ "version": "^1.0.26"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/select-text@6.5.21</title>
5
+ <title>@pie-element/select-text@6.5.22</title>
6
6
  <link
7
7
  href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
8
  rel="stylesheet"
package/module/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_lodash, _dll_debug, _dll_classnames, _dll_pie_lib__render_ui, _dll_react_dom_server, _dll_pie_lib__correct_answer_toggle, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.3.1/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.24/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_lodash, _dll_debug, _dll_classnames, _dll_pie_lib__render_ui, _dll_react_dom_server, _dll_pie_lib__correct_answer_toggle, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.1/module/index.js";
2
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.26/module/index.js";
3
3
  const React$7 = _dll_react;
4
4
  const PropTypes$6 = _dll_prop_types;
5
5
  const {Button: Button} = _dll_material_ui__core;
@@ -2430,6 +2430,7 @@ const preparePrintModel = (model, opts) => {
2430
2430
  const instr = opts.role === 'instructor';
2431
2431
  model.prompt = model.promptEnabled !== false ? model.prompt : undefined;
2432
2432
  model.teacherInstructions = instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;
2433
+ model.rationale = instr && model.rationaleEnabled !== false ? model.rationale : undefined;
2433
2434
  model.showTeacherInstructions = instr;
2434
2435
  model.alwaysShowCorrect = instr;
2435
2436
  model.mode = instr ? 'evaluate' : model.mode;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "6.5.22",
7
+ "version": "6.5.23",
8
8
  "description": "",
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "author": "",
21
21
  "license": "ISC",
22
- "gitHead": "cd1a2efd59f915b882937dea95c2675b2d2a3a50",
22
+ "gitHead": "711fb90f7f30b2b7438fd252d104b2c9c25accba",
23
23
  "scripts": {
24
24
  "postpublish": "../../scripts/postpublish"
25
25
  },