@pie-element/extended-text-entry 10.18.1-next.9 → 10.19.1-next.16

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,18 @@
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
+ # [10.19.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@10.18.0...@pie-element/extended-text-entry@10.19.0) (2024-06-24)
7
+
8
+
9
+ ### Features
10
+
11
+ * update pie-lib/pie-toolbox PD-3868, PD-3771, PD-3772, PD-3775 ([4475c65](https://github.com/pie-framework/pie-elements/commit/4475c658be5489a0f66be27af24e01c03b32b294))
12
+ * update pie-lib/pie-toolbox PD-3868, PD-3771, PD-3772, PD-3775 - fixed tests ([ae244d6](https://github.com/pie-framework/pie-elements/commit/ae244d64a5621e0bda273b48d20b86a2fdd87ab3))
13
+
14
+
15
+
16
+
17
+
6
18
  # [10.18.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@10.17.0...@pie-element/extended-text-entry@10.18.0) (2024-06-24)
7
19
 
8
20
 
@@ -3,6 +3,18 @@
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
+ # [9.17.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@9.16.0...@pie-element/extended-text-entry-configure@9.17.0) (2024-06-24)
7
+
8
+
9
+ ### Features
10
+
11
+ * update pie-lib/pie-toolbox PD-3868, PD-3771, PD-3772, PD-3775 ([4475c65](https://github.com/pie-framework/pie-elements/commit/4475c658be5489a0f66be27af24e01c03b32b294))
12
+ * update pie-lib/pie-toolbox PD-3868, PD-3771, PD-3772, PD-3775 - fixed tests ([ae244d6](https://github.com/pie-framework/pie-elements/commit/ae244d64a5621e0bda273b48d20b86a2fdd87ab3))
13
+
14
+
15
+
16
+
17
+
6
18
  # [9.16.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@9.15.0...@pie-element/extended-text-entry-configure@9.16.0) (2024-06-24)
7
19
 
8
20
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry-configure",
3
3
  "private": true,
4
- "version": "9.16.0",
4
+ "version": "9.17.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -10,7 +10,7 @@
10
10
  "dependencies": {
11
11
  "@material-ui/core": "^3.9.2",
12
12
  "@pie-framework/pie-configure-events": "^1.3.0",
13
- "@pie-lib/pie-toolbox": "1.24.0",
13
+ "@pie-lib/pie-toolbox": "1.24.2",
14
14
  "lodash": "^4.17.15",
15
15
  "prop-types": "^15.6.2",
16
16
  "react": "^16.8.1",
@@ -3,6 +3,17 @@
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.17.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@5.16.0...@pie-element/extended-text-entry-controller@5.17.0) (2024-06-24)
7
+
8
+
9
+ ### Features
10
+
11
+ * update pie-lib/pie-toolbox PD-3868, PD-3771, PD-3772, PD-3775 ([4475c65](https://github.com/pie-framework/pie-elements/commit/4475c658be5489a0f66be27af24e01c03b32b294))
12
+
13
+
14
+
15
+
16
+
6
17
  # [5.16.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@5.15.0...@pie-element/extended-text-entry-controller@5.16.0) (2024-06-24)
7
18
 
8
19
 
@@ -118,6 +118,7 @@ function _model() {
118
118
  disabled: env.mode !== 'gather',
119
119
  feedback: feedback,
120
120
  teacherInstructions: teacherInstructions,
121
+ language: normalizedQuestion.language,
121
122
  mathInput: normalizedQuestion.mathInput,
122
123
  spanishInput: normalizedQuestion.spanishInput,
123
124
  specialInput: normalizedQuestion.specialInput,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["log","createDefaultModel","model","defaults","normalize","question","session","env","normalizedQuestion","fb","mode","feedbackEnabled","feedback","Promise","resolve","undefined","teacherInstructions","role","teacherInstructionsEnabled","equationEditor","annotatorMode","annotationsEnabled","then","prompt","promptEnabled","dimensions","customKeys","id","disabled","mathInput","spanishInput","specialInput","spellCheckEnabled","playerSpellCheckDisabled","playersToolbarPosition","disabledAnnotator","predefinedAnnotations","outcome","score","completed","note","getInnerText","html","replaceAll","getContent","replace","validate","config","errors","forEach","field","required"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,6CAAN,CAAZ;;SAEsBC,kB;;;;;sGAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkCC,YAAAA,KAAlC,2DAA0C,EAA1C;AACLF,YAAAA,GAAG,CAAC,sBAAD,EAAyBE,KAAzB,CAAH;AADK,6EAGOC,oBAHP,GAGoBD,KAHpB;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AAMA,IAAME,SAAS,GAAG,SAAZA,SAAY,CAACC,QAAD;AAAA,yCAAoBF,oBAApB,GAAiCE,QAAjC;AAAA,CAAlB;;;;SAEeH,K;;;;;yFAAf,kBAAqBG,QAArB,EAA+BC,OAA/B,EAAwCC,GAAxC;AAAA;AAAA;AAAA;AAAA;AAAA;AACLP,YAAAA,GAAG,CAAC,YAAD,EAAeK,QAAf,CAAH;AACMG,YAAAA,kBAFD,GAEsBJ,SAAS,CAACC,QAAD,CAF/B;AAICI,YAAAA,EAJD,GAKHF,GAAG,CAACG,IAAJ,KAAa,UAAb,IAA2BF,kBAAkB,CAACG,eAA9C,GACI,2BAAYH,kBAAkB,CAACI,QAA/B,EAAyC,gCAAzC,CADJ,GAEIC,OAAO,CAACC,OAAR,CAAgBC,SAAhB,CAPD;AASDC,YAAAA,mBATC,GASqB,IATrB;;AAUL,gB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AoD,EAApD,CAAV;AAAA,CAAnB;;AAEO,IAAMC,QAAQ,GAAG,SAAXA,QAAW,GAA6B;AAAA,MAA5B5C,KAA4B,uEAApB,EAAoB;AAAA,MAAhB6C,MAAgB,uEAAP,EAAO;AACnD,MAAMC,MAAM,GAAG,EAAf;AAEA,GAAC,qBAAD,EAAwB,QAAxB,EAAkCC,OAAlC,CAA0C,UAACC,KAAD,EAAW;AAAA;;AACnD,QAAI,iBAAAH,MAAM,CAACG,KAAD,CAAN,wDAAeC,QAAf,IAA2B,CAACP,UAAU,CAAC1C,KAAK,CAACgD,KAAD,CAAN,CAA1C,EAA0D;AACxDF,MAAAA,MAAM,CAACE,KAAD,CAAN,GAAgB,yBAAhB;AACD;AACF,GAJD;AAMA,SAAOF,MAAP;AACD,CAVM","sourcesContent":["import debug from 'debug';\nimport { getFeedback } from '@pie-lib/pie-toolbox/feedback';\nimport defaults from './defaults';\n\nconst log = debug('@pie-element:extended-text-entry:controller');\n\nexport async function createDefaultModel(model = {}) {\n log('[createDefaultModel]', model);\n\n return { ...defaults, ...model };\n}\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport async function model(question, session, env) {\n log('[question]', question);\n const normalizedQuestion = normalize(question);\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedback(normalizedQuestion.feedback, 'Your answer has been submitted')\n : Promise.resolve(undefined);\n\n let teacherInstructions = null;\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;\n } else {\n teacherInstructions = null;\n }\n\n let equationEditor = normalizedQuestion.equationEditor || 'miscellaneous';\n\n switch (normalizedQuestion.equationEditor) {\n case 'Grade 1 - 2':\n equationEditor = 1;\n break;\n case 'Grade 3 - 5':\n equationEditor = 3;\n break;\n case 'Grade 6 - 7':\n equationEditor = 6;\n break;\n case 'Grade 8 - HS':\n equationEditor = 8;\n break;\n default:\n break;\n }\n\n const annotatorMode = normalizedQuestion.annotationsEnabled && (env.role === 'instructor' || env.mode === 'evaluate');\n\n return fb.then((feedback) => ({\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n dimensions: normalizedQuestion.dimensions,\n customKeys: normalizedQuestion.customKeys || [],\n id: normalizedQuestion.id,\n disabled: env.mode !== 'gather',\n feedback,\n teacherInstructions,\n mathInput: normalizedQuestion.mathInput,\n spanishInput: normalizedQuestion.spanishInput,\n specialInput: normalizedQuestion.specialInput,\n equationEditor,\n spellCheckEnabled: !normalizedQuestion.playerSpellCheckDisabled,\n playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom',\n annotatorMode,\n disabledAnnotator: normalizedQuestion.annotationsEnabled ? env.role !== 'instructor' : true,\n predefinedAnnotations: normalizedQuestion.annotationsEnabled ? normalizedQuestion.predefinedAnnotations : [],\n }));\n}\n\nexport async function outcome(/*question, session, env*/) {\n return {\n score: 0,\n completed: 'n/a',\n note: 'Requires manual scoring',\n };\n}\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img and iframe\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const errors = {};\n\n ['teacherInstructions', 'prompt'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n return errors;\n};\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["log","createDefaultModel","model","defaults","normalize","question","session","env","normalizedQuestion","fb","mode","feedbackEnabled","feedback","Promise","resolve","undefined","teacherInstructions","role","teacherInstructionsEnabled","equationEditor","annotatorMode","annotationsEnabled","then","prompt","promptEnabled","dimensions","customKeys","id","disabled","language","mathInput","spanishInput","specialInput","spellCheckEnabled","playerSpellCheckDisabled","playersToolbarPosition","disabledAnnotator","predefinedAnnotations","outcome","score","completed","note","getInnerText","html","replaceAll","getContent","replace","validate","config","errors","forEach","field","required"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,6CAAN,CAAZ;;SAEsBC,kB;;;;;sGAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkCC,YAAAA,KAAlC,2DAA0C,EAA1C;AACLF,YAAAA,GAAG,CAAC,sBAAD,EAAyBE,KAAzB,CAAH;AADK,6EAGOC,oBAHP,GAGoBD,KAHpB;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AAMA,IAAME,SAAS,GAAG,SAAZA,SAAY,CAACC,QAAD;AAAA,yCAAoBF,oBAApB,GAAiCE,QAAjC;AAAA,CAAlB;;;;SAEeH,K;;;;;yFAAf,kBAAqBG,QAArB,EAA+BC,OAA/B,EAAwCC,GAAxC;AAAA;AAAA;AAAA;AAAA;AAAA;AACLP,YAAAA,GAAG,CAAC,YAAD,EAAeK,QAAf,CAAH;AACMG,YAAAA,kBAFD,GAEsBJ,SAAS,CAACC,QAAD,CAF/B;AAICI,YAAAA,EAJD,GAKHF,GAAG,CAACG,IAAJ,KAAa,UAAb,IAA2BF,kBAAkB,CAACG,eAA9C,GACI,2BAAYH,kBAAkB,CAACI,QAA/B,EAAyC,gCAAzC,CADJ,GAEIC,OAAO,CAACC,OAAR,CAAgBC,SAAhB,CAPD;AASDC,YAAAA,mBATC,GASqB,IATrB;;AAUL,gBAAIT,GAAG,CAACU,IAAJ,KAAa,YAAb,KAA8BV,GAAG,CAACG,IAAJ,KAAa,MAAb,IAAuBH,GAAG,CAACG,IAAJ,KAAa,UAAlE,CAAJ,EAAmF;AACjFM,cAAAA,mBAAmB,GAAGR,kBAAkB,CAACU,0BAAnB,GAAgDV,kBAAkB,CAACQ,mBAAnE,GAAyF,IAA/G;AACD,aAFD,MAEO;AACLA,cAAAA,mBAAmB,GAAG,IAAtB;AACD;;AAEGG,YAAAA,c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AAD,EAAW;AAAA;;AACnD,QAAI,iBAAAH,MAAM,CAACG,KAAD,CAAN,wDAAeC,QAAf,IAA2B,CAACP,UAAU,CAAC3C,KAAK,CAACiD,KAAD,CAAN,CAA1C,EAA0D;AACxDF,MAAAA,MAAM,CAACE,KAAD,CAAN,GAAgB,yBAAhB;AACD;AACF,GAJD;AAMA,SAAOF,MAAP;AACD,CAVM","sourcesContent":["import debug from 'debug';\nimport { getFeedback } from '@pie-lib/pie-toolbox/feedback';\nimport defaults from './defaults';\n\nconst log = debug('@pie-element:extended-text-entry:controller');\n\nexport async function createDefaultModel(model = {}) {\n log('[createDefaultModel]', model);\n\n return { ...defaults, ...model };\n}\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport async function model(question, session, env) {\n log('[question]', question);\n const normalizedQuestion = normalize(question);\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedback(normalizedQuestion.feedback, 'Your answer has been submitted')\n : Promise.resolve(undefined);\n\n let teacherInstructions = null;\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;\n } else {\n teacherInstructions = null;\n }\n\n let equationEditor = normalizedQuestion.equationEditor || 'miscellaneous';\n\n switch (normalizedQuestion.equationEditor) {\n case 'Grade 1 - 2':\n equationEditor = 1;\n break;\n case 'Grade 3 - 5':\n equationEditor = 3;\n break;\n case 'Grade 6 - 7':\n equationEditor = 6;\n break;\n case 'Grade 8 - HS':\n equationEditor = 8;\n break;\n default:\n break;\n }\n\n const annotatorMode = normalizedQuestion.annotationsEnabled && (env.role === 'instructor' || env.mode === 'evaluate');\n\n return fb.then((feedback) => ({\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n dimensions: normalizedQuestion.dimensions,\n customKeys: normalizedQuestion.customKeys || [],\n id: normalizedQuestion.id,\n disabled: env.mode !== 'gather',\n feedback,\n teacherInstructions,\n language:normalizedQuestion.language,\n mathInput: normalizedQuestion.mathInput,\n spanishInput: normalizedQuestion.spanishInput,\n specialInput: normalizedQuestion.specialInput,\n equationEditor,\n spellCheckEnabled: !normalizedQuestion.playerSpellCheckDisabled,\n playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom',\n annotatorMode,\n disabledAnnotator: normalizedQuestion.annotationsEnabled ? env.role !== 'instructor' : true,\n predefinedAnnotations: normalizedQuestion.annotationsEnabled ? normalizedQuestion.predefinedAnnotations : [],\n }));\n}\n\nexport async function outcome(/*question, session, env*/) {\n return {\n score: 0,\n completed: 'n/a',\n note: 'Requires manual scoring',\n };\n}\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img and iframe\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const errors = {};\n\n ['teacherInstructions', 'prompt'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n return errors;\n};\n"],"file":"index.js"}
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry-controller",
3
3
  "private": true,
4
- "version": "5.16.0",
4
+ "version": "5.17.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
- "@pie-lib/pie-toolbox": "1.24.0"
9
+ "@pie-lib/pie-toolbox": "1.24.2"
10
10
  },
11
11
  "scripts": {
12
12
  "test": "echo \"Error: no test specified\" && exit 1"
package/lib/index.js CHANGED
@@ -83,6 +83,13 @@ var RootExtendedTextEntry = /*#__PURE__*/function (_HTMLElement) {
83
83
  }
84
84
 
85
85
  (0, _createClass2["default"])(RootExtendedTextEntry, [{
86
+ key: "setLangAttribute",
87
+ value: function setLangAttribute() {
88
+ var language = this._model && (0, _typeof2["default"])(this._model.language) ? this._model.language : '';
89
+ var lang = language ? language.slice(0, 2) : 'en';
90
+ this.setAttribute('lang', lang);
91
+ }
92
+ }, {
86
93
  key: "model",
87
94
  set: function set(m) {
88
95
  this._model = m;
@@ -140,6 +147,8 @@ var RootExtendedTextEntry = /*#__PURE__*/function (_HTMLElement) {
140
147
  onCommentChange: this.commentChange.bind(this)
141
148
  });
142
149
 
150
+ this.setLangAttribute();
151
+
143
152
  _reactDom["default"].render(elem, this, function () {
144
153
  (0, _mathRenderingAccessible.renderMath)(_this2);
145
154
  });
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["log","domParser","window","undefined","DOMParser","parseFromString","v","textContent","value","document","body","err","isComplete","tc","out","length","RootExtendedTextEntry","_model","_session","m","dispatchEvent","ModelSetEvent","tagName","toLowerCase","render","s","SessionChangedEvent","annotations","comment","setAttribute","elem","React","createElement","Main","model","session","onValueChange","valueChange","bind","onAnnotationsChange","annotationsChange","onCommentChange","commentChange","ReactDOM","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,mCAAN,CAAZ;AAEA,IAAMC,SAAS,GAAG,QAAOC,MAAP,0DAAOA,MAAP,OAAkBC,SAAlB,GAA8B,IAAIC,SAAJ,EAA9B,GAAgD;AAAEC,EAAAA,eAAe,EAAE,yBAACC,CAAD;AAAA,WAAOA,CAAP;AAAA;AAAnB,CAAlE;;AAEO,SAASC,WAAT,CAAqBC,KAArB,EAA4B;AACjC,MAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;AAC7B,WAAOL,SAAP;AACD;;AAED,MAAI;AACF,QAAMM,QAAQ,GAAGR,SAAS,CAACI,eAAV,CAA0BG,KAA1B,EAAiC,WAAjC,CAAjB;AACA,QAAMD,YAAW,GAAGE,QAAQ,CAACC,IAAT,CAAcH,WAAlC;AAEA,WAAOA,YAAP;AACD,GALD,CAKE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AAcI,OAAd,EAAuB;AACrB,WAAKV,QAAL,CAAcU,OAAd,GAAwBA,OAAxB;AAEA,WAAKR,aAAL,CAAmB,IAAIM,oCAAJ,CAAwB,KAAKJ,OAAL,CAAaC,WAAb,EAAxB,EAAoDX,UAAU,CAACgB,OAAD,CAA9D,CAAnB;AAEA,WAAKJ,MAAL;AACD;;;WAED,6BAAoB;AAClB,WAAKK,YAAL,CAAkB,YAAlB,EAAgC,2BAAhC;AACA,WAAKA,YAAL,CAAkB,MAAlB,EAA0B,QAA1B;AAEA,WAAKL,MAAL;AACD;;;WAED,kBAAS;AAAA;;AACP,UAAI,KAAKP,MAAL,IAAe,KAAKC,QAAxB,EAAkC;AAChC,YAAIY,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCC,UAAAA,KAAK,EAAE,KAAKjB,MADuB;AAEnCkB,UAAAA,OAAO,EAAE,KAAKjB,QAFqB;AAGnCkB,UAAAA,aAAa,EAAE,KAAKC,WAAL,CAAiBC,IAAjB,CAAsB,IAAtB,CAHoB;AAInCC,UAAAA,mBAAmB,EAAE,KAAKC,iBAAL,CAAuBF,IAAvB,CAA4B,IAA5B,CAJc;AAKnCG,UAAAA,eAAe,EAAE,KAAKC,aAAL,CAAmBJ,IAAnB,CAAwB,IAAxB;AALkB,SAA1B,CAAX;;AAQAK,6BAASnB,MAAT,CAAgBM,IAAhB,EAAsB,IAAtB,EAA4B,YAAM;AAChC,mDAAW,MAAX;AACD,SAFD;AAGD;AACF;;;kDApEgDc,W","sourcesContent":["import Main from './main';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport debug from 'debug';\n\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\n\nconst log = debug('@pie-elements:extended-text-entry');\n\nconst domParser = typeof window !== undefined ? new DOMParser() : { parseFromString: (v) => v };\n\nexport function textContent(value) {\n if (typeof value !== 'string') {\n return undefined;\n }\n\n try {\n const document = domParser.parseFromString(value, 'text/html');\n const textContent = document.body.textContent;\n\n return textContent;\n } catch (err) {\n log('tried to parse as dom and failed', value);\n return value;\n }\n}\n\nexport function isComplete(value) {\n const tc = textContent(value);\n const out = tc !== undefined && tc.length > 0;\n\n return out;\n}\n\nexport default class RootExtendedTextEntry 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(new ModelSetEvent(this.tagName.toLowerCase(), false, !!this._model));\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 valueChange(value) {\n this._session.value = value;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), isComplete(value)));\n\n this.render();\n }\n\n annotationsChange(annotations) {\n this._session.annotations = annotations;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), true));\n\n this.render();\n }\n\n commentChange(comment) {\n this._session.comment = comment;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), isComplete(comment)));\n\n this.render();\n }\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Written Response Question');\n this.setAttribute('role', 'region');\n\n this.render();\n }\n\n render() {\n if (this._model && this._session) {\n let elem = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onValueChange: this.valueChange.bind(this),\n onAnnotationsChange: this.annotationsChange.bind(this),\n onCommentChange: this.commentChange.bind(this),\n });\n\n ReactDOM.render(elem, this, () => {\n renderMath(this);\n });\n }\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["log","domParser","window","undefined","DOMParser","parseFromString","v","textContent","value","document","body","err","isComplete","tc","out","length","RootExtendedTextEntry","_model","_session","language","lang","slice","setAttribute","m","dispatchEvent","ModelSetEvent","tagName","toLowerCase","render","s","SessionChangedEvent","annotations","comment","elem","React","createElement","Main","model","session","onValueChange","valueChange","bind","onAnnotationsChange","annotationsCh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hC;AACA,WAAKA,YAAL,CAAkB,MAAlB,EAA0B,QAA1B;AAEA,WAAKM,MAAL;AACD;;;WAED,kBAAS;AAAA;;AACP,UAAI,KAAKX,MAAL,IAAe,KAAKC,QAAxB,EAAkC;AAChC,YAAIe,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCC,UAAAA,KAAK,EAAE,KAAKpB,MADuB;AAEnCqB,UAAAA,OAAO,EAAE,KAAKpB,QAFqB;AAGnCqB,UAAAA,aAAa,EAAE,KAAKC,WAAL,CAAiBC,IAAjB,CAAsB,IAAtB,CAHoB;AAInCC,UAAAA,mBAAmB,EAAE,KAAKC,iBAAL,CAAuBF,IAAvB,CAA4B,IAA5B,CAJc;AAKnCG,UAAAA,eAAe,EAAE,KAAKC,aAAL,CAAmBJ,IAAnB,CAAwB,IAAxB;AALkB,SAA1B,CAAX;;AAQA,aAAKK,gBAAL;;AAEAC,6BAASnB,MAAT,CAAgBK,IAAhB,EAAsB,IAAtB,EAA4B,YAAM;AAChC,mDAAW,MAAX;AACD,SAFD;AAGD;AACF;;;kDA5EgDe,W","sourcesContent":["import Main from './main';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport debug from 'debug';\n\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\n\nconst log = debug('@pie-elements:extended-text-entry');\n\nconst domParser = typeof window !== undefined ? new DOMParser() : { parseFromString: (v) => v };\n\nexport function textContent(value) {\n if (typeof value !== 'string') {\n return undefined;\n }\n\n try {\n const document = domParser.parseFromString(value, 'text/html');\n const textContent = document.body.textContent;\n\n return textContent;\n } catch (err) {\n log('tried to parse as dom and failed', value);\n return value;\n }\n}\n\nexport function isComplete(value) {\n const tc = textContent(value);\n const out = tc !== undefined && tc.length > 0;\n\n return out;\n}\n\nexport default class RootExtendedTextEntry extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n }\n\n setLangAttribute() {\n const language = this._model && typeof this._model.language ? this._model.language : '';\n const lang = language ? language.slice(0, 2) : 'en';\n this.setAttribute('lang', lang);\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), false, !!this._model));\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 valueChange(value) {\n this._session.value = value;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), isComplete(value)));\n\n this.render();\n }\n\n annotationsChange(annotations) {\n this._session.annotations = annotations;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), true));\n\n this.render();\n }\n\n commentChange(comment) {\n this._session.comment = comment;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), isComplete(comment)));\n\n this.render();\n }\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Written Response Question');\n this.setAttribute('role', 'region');\n\n this.render();\n }\n\n render() {\n if (this._model && this._session) {\n let elem = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onValueChange: this.valueChange.bind(this),\n onAnnotationsChange: this.annotationsChange.bind(this),\n onCommentChange: this.commentChange.bind(this),\n });\n\n this.setLangAttribute();\n\n ReactDOM.render(elem, this, () => {\n renderMath(this);\n });\n }\n }\n}\n"],"file":"index.js"}
@@ -291,6 +291,7 @@ async function model(question, session, env) {
291
291
  disabled: env.mode !== 'gather',
292
292
  feedback,
293
293
  teacherInstructions,
294
+ language:normalizedQuestion.language,
294
295
  mathInput: normalizedQuestion.mathInput,
295
296
  spanishInput: normalizedQuestion.spanishInput,
296
297
  specialInput: normalizedQuestion.specialInput,
package/module/element.js CHANGED
@@ -13016,6 +13016,11 @@ class RootExtendedTextEntry extends HTMLElement {
13016
13016
  this._model = null;
13017
13017
  this._session = null;
13018
13018
  }
13019
+ setLangAttribute() {
13020
+ const language = this._model && typeof this._model.language ? this._model.language : '';
13021
+ const lang = language ? language.slice(0, 2) : 'en';
13022
+ this.setAttribute('lang', lang);
13023
+ }
13019
13024
  set model(m) {
13020
13025
  this._model = m;
13021
13026
  this.dispatchEvent(new ModelSetEvent_1(this.tagName.toLowerCase(), false, !!this._model));
@@ -13057,6 +13062,7 @@ class RootExtendedTextEntry extends HTMLElement {
13057
13062
  onAnnotationsChange: this.annotationsChange.bind(this),
13058
13063
  onCommentChange: this.commentChange.bind(this)
13059
13064
  });
13065
+ this.setLangAttribute();
13060
13066
  ReactDOM.render(elem, this, () => {
13061
13067
  renderMath(this);
13062
13068
  });
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/extended-text-entry@10.18.0</title>
5
+ <title>@pie-element/extended-text-entry@10.19.0</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,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry",
3
- "version": "10.18.0",
3
+ "version": "10.19.0",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/extended-text-entry@10.18.0</title>
5
+ <title>@pie-element/extended-text-entry@10.19.0</title>
6
6
  <link
7
7
  href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
8
  rel="stylesheet"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry",
3
- "version": "10.18.1-next.9+2e7ddfa1d",
3
+ "version": "10.19.1-next.16+b36b249b4",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -12,7 +12,7 @@
12
12
  "@material-ui/core": "^3.9.2",
13
13
  "@material-ui/icons": "^3.0.2",
14
14
  "@pie-framework/pie-player-events": "^0.1.0",
15
- "@pie-lib/pie-toolbox": "1.24.0",
15
+ "@pie-lib/pie-toolbox": "1.24.2",
16
16
  "classnames": "^2.2.5",
17
17
  "debug": "^4.1.1",
18
18
  "lodash.throttle": "^4.1.1",
@@ -20,7 +20,7 @@
20
20
  "react": "^16.8.1",
21
21
  "react-dom": "^16.8.1"
22
22
  },
23
- "gitHead": "2e7ddfa1d52b87cbf05d5025a6f1b3181790df82",
23
+ "gitHead": "b36b249b469eb1346acd5abc9b774a2ffe3f51b9",
24
24
  "scripts": {
25
25
  "postpublish": "../../scripts/postpublish"
26
26
  },