@pie-element/likert 0.45.7-next.8 → 0.45.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
+ ## [0.45.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/likert@0.45.6...@pie-element/likert@0.45.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
  ## [0.45.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/likert@0.45.5...@pie-element/likert@0.45.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
+ ## [0.39.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/likert-configure@0.39.6...@pie-element/likert-configure@0.39.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
  ## [0.39.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/likert-configure@0.39.5...@pie-element/likert-configure@0.39.6) (2025-05-22)
7
21
 
8
22
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/likert-configure",
3
3
  "private": true,
4
- "version": "0.39.6",
4
+ "version": "0.39.7",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-framework/pie-configure-events": "^1.3.0",
12
- "@pie-lib/pie-toolbox": "2.17.4",
12
+ "@pie-lib/pie-toolbox": "2.17.6",
13
13
  "debug": "^4.1.1",
14
14
  "prop-types": "^15.6.2",
15
15
  "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
+ ## [0.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/likert-controller@0.1.1...@pie-element/likert-controller@0.1.2) (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
+
13
+
14
+
15
+
16
+
6
17
  ## [0.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/likert-controller@0.1.0...@pie-element/likert-controller@0.1.1) (2024-10-22)
7
18
 
8
19
  **Note:** Version bump only for package @pie-element/likert-controller
@@ -101,11 +101,11 @@ function outcome() {
101
101
 
102
102
  var getInnerText = function getInnerText(html) {
103
103
  return (html || '').replaceAll(/<[^>]*>/g, '');
104
- }; // remove all html tags except img and iframe
104
+ }; // remove all html tags except img, iframe and source tag for audio
105
105
 
106
106
 
107
107
  var getContent = function getContent(html) {
108
- return (html || '').replace(/(<(?!img|iframe)([^>]+)>)/gi, '');
108
+ return (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
109
109
  };
110
110
 
111
111
  var validate = function validate() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["prepareChoice","choice","label","value","createDefaultModel","model","Promise","resolve","defaults","normalize","question","session","env","normalizedQuestion","choices","map","out","disabled","mode","role","teacherInstructions","teacherInstructionsEnabled","outcome","score","empty","getInnerText","html","replaceAll","getContent","replace","validate","config","errors","forEach","field","required"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,MAAD,EAAY;AAChC,SAAO;AACLC,IAAAA,KAAK,EAAED,MAAM,CAACC,KADT;AAELC,IAAAA,KAAK,EAAEF,MAAM,CAACE;AAFT,GAAP;AAID,CALD;;AAOO,SAASC,kBAAT,GAAwC;AAAA,MAAZC,KAAY,uEAAJ,EAAI;AAC7C,SAAO,IAAIC,OAAJ,CAAY,UAACC,OAAD;AAAA,WAAaA,OAAO,iCAAMC,oBAAN,GAAmBH,KAAnB,EAApB;AAAA,GAAZ,CAAP;AACD;;AAEM,IAAMI,SAAS,GAAG,SAAZA,SAAY,CAACC,QAAD;AAAA,yCAAoBF,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,EAAaC,UAAb,CAAwB,UAAxB,EAAoC,EAApC,CAAV;AAAA,CAArB,C,CAEA;;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAACF,IAAD;AAAA,SAAU,CAACA,IAAI,IAAI,EAAT,EAAaG,OAAb,CAAqB,6BAArB,EAAoD,EAApD,CAAV;AAAA,CAAnB;;AAEO,IAAMC,QAAQ,GAAG,SAAXA,QAAW,GAA6B;AAAA,MAA5BzB,KAA4B,uEAApB,EAAoB;AAAA,MAAhB0B,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,CAACvB,KAAK,CAAC6B,KAAD,CAAN,CAA1C,EAA0D;AACxDF,MAAAA,MAAM,CAACE,KAAD,CAAN,GAAgB,yBAAhB;AACD;AACF,GAJD;AAMA,SAAOF,MAAP;AACD,CAVM","sourcesContent":["import defaults from './defaults';\n\nconst prepareChoice = (choice) => {\n return {\n label: choice.label,\n value: choice.value,\n };\n};\n\nexport function createDefaultModel(model = {}) {\n return new Promise((resolve) => resolve({ ...defaults, ...model }));\n}\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n */\nexport async function model(question, session, env) {\n const normalizedQuestion = normalize(question);\n\n let choices = normalizedQuestion.choices.map(prepareChoice);\n\n const out = {\n ...normalizedQuestion,\n choices,\n disabled: env.mode !== 'gather',\n mode: env.mode,\n };\n\n const { role, mode } = env || {};\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled\n ? normalizedQuestion.teacherInstructions\n : null;\n } else {\n out.teacherInstructions = null;\n }\n\n return out;\n}\n\nexport function outcome() {\n return new Promise((resolve) => {\n resolve({ score: 0, empty: false });\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":["prepareChoice","choice","label","value","createDefaultModel","model","Promise","resolve","defaults","normalize","question","session","env","normalizedQuestion","choices","map","out","disabled","mode","role","teacherInstructions","teacherInstructionsEnabled","outcome","score","empty","getInnerText","html","replaceAll","getContent","replace","validate","config","errors","forEach","field","required"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,MAAD,EAAY;AAChC,SAAO;AACLC,IAAAA,KAAK,EAAED,MAAM,CAACC,KADT;AAELC,IAAAA,KAAK,EAAEF,MAAM,CAACE;AAFT,GAAP;AAID,CALD;;AAOO,SAASC,kBAAT,GAAwC;AAAA,MAAZC,KAAY,uEAAJ,EAAI;AAC7C,SAAO,IAAIC,OAAJ,CAAY,UAACC,OAAD;AAAA,WAAaA,OAAO,iCAAMC,oBAAN,GAAmBH,KAAnB,EAApB;AAAA,GAAZ,CAAP;AACD;;AAEM,IAAMI,SAAS,GAAG,SAAZA,SAAY,CAACC,QAAD;AAAA,yCAAoBF,oBAApB,GAAiCE,QAAjC;AAAA,CAAlB;AAEP;AACA;AACA;AACA;AACA;AACA;;;;;SACsBL,K;;;;;yFAAf,iBAAqBK,QAArB,EAA+BC,OAA/B,EAAwCC,GAAxC;AAAA;;AAAA;AAAA;AAAA;AAAA;AACCC,YAAAA,kBADD,GACsBJ,SAAS,CAACC,QAAD,CAD/B;AAGDI,Y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QAAQ,GAAG,SAAXA,QAAW,GAA6B;AAAA,MAA5BzB,KAA4B,uEAApB,EAAoB;AAAA,MAAhB0B,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,CAACvB,KAAK,CAAC6B,KAAD,CAAN,CAA1C,EAA0D;AACxDF,MAAAA,MAAM,CAACE,KAAD,CAAN,GAAgB,yBAAhB;AACD;AACF,GAJD;AAMA,SAAOF,MAAP;AACD,CAVM","sourcesContent":["import defaults from './defaults';\n\nconst prepareChoice = (choice) => {\n return {\n label: choice.label,\n value: choice.value,\n };\n};\n\nexport function createDefaultModel(model = {}) {\n return new Promise((resolve) => resolve({ ...defaults, ...model }));\n}\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n */\nexport async function model(question, session, env) {\n const normalizedQuestion = normalize(question);\n\n let choices = normalizedQuestion.choices.map(prepareChoice);\n\n const out = {\n ...normalizedQuestion,\n choices,\n disabled: env.mode !== 'gather',\n mode: env.mode,\n };\n\n const { role, mode } = env || {};\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled\n ? normalizedQuestion.teacherInstructions\n : null;\n } else {\n out.teacherInstructions = null;\n }\n\n return out;\n}\n\nexport function outcome() {\n return new Promise((resolve) => {\n resolve({ score: 0, empty: false });\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,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/likert-controller",
3
3
  "private": true,
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "0.45.7-next.8+a98d9306e",
7
+ "version": "0.45.7",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "@material-ui/core": "^3.9.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": "^4.17.10",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "author": "",
26
26
  "license": "ISC",
27
- "gitHead": "a98d9306e52686234b7c27133fcca6f04500c448",
27
+ "gitHead": "148a29a55830c59e50e390d512b19d730e3d1663",
28
28
  "main": "lib/index.js",
29
29
  "module": "src/index.js"
30
30
  }