@pie-element/extended-text-entry 11.7.7-next.8 → 11.7.7

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,21 @@
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
+ ## [11.7.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@11.7.6...@pie-element/extended-text-entry@11.7.7) (2025-06-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add validation for audio content PD-4123 ([f0ce3f1](https://github.com/pie-framework/pie-elements/commit/f0ce3f19a12fd4cfe2d2159ca4af801d866dc8a9))
12
+ * update pie-lib pie-toolbox PD-3756 and revert changes for PD-4810 ([1e3030b](https://github.com/pie-framework/pie-elements/commit/1e3030bfdb13d0cce7b54ce0e9a109446c5ec2a2))
13
+ * update pie-lib-pie-toolbox PD-4810 ([6c81afc](https://github.com/pie-framework/pie-elements/commit/6c81afc6a8ad41e001bafb0bd1563164e9f32a10))
14
+ * update pie-lib-pie-toolbox PD-4810 ([0f9dd82](https://github.com/pie-framework/pie-elements/commit/0f9dd827c474e87770fd3bd146d870dd77d296df))
15
+ * update pie-lib/pie-toolbox PD-4888, PD-3542, PD-4873, PD-4679 ([9c3bdef](https://github.com/pie-framework/pie-elements/commit/9c3bdef1b68f128ecc6338ef74f25fb74c482aa6))
16
+
17
+
18
+
19
+
20
+
6
21
  ## [11.7.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@11.7.5...@pie-element/extended-text-entry@11.7.6) (2025-05-22)
7
22
 
8
23
 
@@ -3,6 +3,20 @@
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.5.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@10.5.6...@pie-element/extended-text-entry-configure@10.5.7) (2025-06-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib pie-toolbox PD-3756 and revert changes for PD-4810 ([1e3030b](https://github.com/pie-framework/pie-elements/commit/1e3030bfdb13d0cce7b54ce0e9a109446c5ec2a2))
12
+ * update pie-lib-pie-toolbox PD-4810 ([6c81afc](https://github.com/pie-framework/pie-elements/commit/6c81afc6a8ad41e001bafb0bd1563164e9f32a10))
13
+ * update pie-lib-pie-toolbox PD-4810 ([0f9dd82](https://github.com/pie-framework/pie-elements/commit/0f9dd827c474e87770fd3bd146d870dd77d296df))
14
+ * update pie-lib/pie-toolbox PD-4888, PD-3542, PD-4873, PD-4679 ([9c3bdef](https://github.com/pie-framework/pie-elements/commit/9c3bdef1b68f128ecc6338ef74f25fb74c482aa6))
15
+
16
+
17
+
18
+
19
+
6
20
  ## [10.5.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@10.5.5...@pie-element/extended-text-entry-configure@10.5.6) (2025-05-22)
7
21
 
8
22
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry-configure",
3
3
  "private": true,
4
- "version": "10.5.6",
4
+ "version": "10.5.7",
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": "2.17.4",
13
+ "@pie-lib/pie-toolbox": "2.17.6",
14
14
  "lodash": "^4.17.15",
15
15
  "prop-types": "^15.6.2",
16
16
  "react": "^16.8.1",
@@ -3,6 +3,21 @@
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.2.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@6.2.6...@pie-element/extended-text-entry-controller@6.2.7) (2025-06-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add validation for audio content PD-4123 ([f0ce3f1](https://github.com/pie-framework/pie-elements/commit/f0ce3f19a12fd4cfe2d2159ca4af801d866dc8a9))
12
+ * update pie-lib pie-toolbox PD-3756 and revert changes for PD-4810 ([1e3030b](https://github.com/pie-framework/pie-elements/commit/1e3030bfdb13d0cce7b54ce0e9a109446c5ec2a2))
13
+ * update pie-lib-pie-toolbox PD-4810 ([6c81afc](https://github.com/pie-framework/pie-elements/commit/6c81afc6a8ad41e001bafb0bd1563164e9f32a10))
14
+ * update pie-lib-pie-toolbox PD-4810 ([0f9dd82](https://github.com/pie-framework/pie-elements/commit/0f9dd827c474e87770fd3bd146d870dd77d296df))
15
+ * update pie-lib/pie-toolbox PD-4888, PD-3542, PD-4873, PD-4679 ([9c3bdef](https://github.com/pie-framework/pie-elements/commit/9c3bdef1b68f128ecc6338ef74f25fb74c482aa6))
16
+
17
+
18
+
19
+
20
+
6
21
  ## [6.2.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@6.2.5...@pie-element/extended-text-entry-controller@6.2.6) (2025-05-22)
7
22
 
8
23
 
@@ -173,11 +173,11 @@ function _outcome() {
173
173
 
174
174
  var getInnerText = function getInnerText(html) {
175
175
  return (html || '').replaceAll(/<[^>]*>/g, '');
176
- }; // remove all html tags except img and iframe
176
+ }; // remove all html tags except img, iframe and source tag for audio
177
177
 
178
178
 
179
179
  var getContent = function getContent(html) {
180
- return (html || '').replace(/(<(?!img|iframe)([^>]+)>)/gi, '');
180
+ return (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
181
181
  };
182
182
 
183
183
  var validate = function validate() {
@@ -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","language","mathInput","spanishInput","specialInput","spellCheckEnabled","playerSpellCheckDisabled","playersToolbarPosition","disabledAnnotator","predefinedAnnotations","extraCSSRules","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,kB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,GAAG,SAAXA,QAAW,GAA6B;AAAA,MAA5B9C,KAA4B,uEAApB,EAAoB;AAAA,MAAhB+C,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,CAAC5C,KAAK,CAACkD,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 extraCSSRules: normalizedQuestion.extraCSSRules,\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","extraCSSRules","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;;AAEG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AAf;AAEA,GAAC,qBAAD,EAAwB,QAAxB,EAAkCC,OAAlC,CAA0C,UAACC,KAAD,EAAW;AAAA;;AACnD,QAAI,iBAAAH,MAAM,CAACG,KAAD,CAAN,wDAAeC,QAAf,IAA2B,CAACP,UAAU,CAAC5C,KAAK,CAACkD,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 extraCSSRules: normalizedQuestion.extraCSSRules,\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, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/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": "6.2.6",
4
+ "version": "6.2.7",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
- "@pie-lib/pie-toolbox": "2.17.4"
9
+ "@pie-lib/pie-toolbox": "2.17.6"
10
10
  },
11
11
  "scripts": {
12
12
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.3/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@7.0.2/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.5/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@7.0.4/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) {
5
5
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -316,8 +316,8 @@ async function outcome(/*question, session, env*/) {
316
316
  };
317
317
  }
318
318
 
319
- // remove all html tags except img and iframe
320
- const getContent = (html) => (html || '').replace(/(<(?!img|iframe)([^>]+)>)/gi, '');
319
+ // remove all html tags except img, iframe and source tag for audio
320
+ const getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
321
321
 
322
322
  const validate = (model = {}, config = {}) => {
323
323
  const errors = {};
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.3/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@7.0.2/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.5/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@7.0.4/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) {
5
5
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -4,11 +4,11 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "4.1.3"
7
+ "version": "4.1.5"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "7.0.2"
11
+ "version": "7.0.4"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.3/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@7.0.2/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.5/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@7.0.4/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) {
5
5
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry",
3
- "version": "11.7.7-next.8+a98d9306e",
3
+ "version": "11.7.7",
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": "2.17.4",
15
+ "@pie-lib/pie-toolbox": "2.17.6",
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": "a98d9306e52686234b7c27133fcca6f04500c448",
23
+ "gitHead": "148a29a55830c59e50e390d512b19d730e3d1663",
24
24
  "scripts": {
25
25
  "postpublish": "../../scripts/postpublish"
26
26
  },