@pie-element/rubric 4.4.5-next.6 → 4.4.5
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 +12 -0
- package/configure/CHANGELOG.md +11 -0
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +12 -0
- package/controller/lib/index.js +2 -8
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +2 -2
- package/controller/src/index.js +2 -6
- package/module/configure.js +2 -2
- package/module/controller.js +2 -8
- package/module/element.js +2 -2
- package/module/manifest.json +2 -2
- package/module/print.js +2 -2
- package/package.json +3 -3
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
|
+
## [4.4.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@4.4.4...@pie-element/rubric@4.4.5) (2025-02-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update pie-lib/pie-toolbox PD-4820, PD-4766 ([7ccdb40](https://github.com/pie-framework/pie-elements/commit/7ccdb405614f1c310efe530d97c46fe324c0a669))
|
|
12
|
+
* **rubric:** fix validation in rubric PD-4833 ([c5fbc60](https://github.com/pie-framework/pie-elements/commit/c5fbc60c0f2b9322ce27f3aecd48baa2e5163863))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [4.4.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@4.4.3...@pie-element/rubric@4.4.4) (2025-02-19)
|
|
7
19
|
|
|
8
20
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -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
|
+
## [4.3.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@4.3.4...@pie-element/rubric-configure@4.3.5) (2025-02-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update pie-lib/pie-toolbox PD-4820, PD-4766 ([7ccdb40](https://github.com/pie-framework/pie-elements/commit/7ccdb405614f1c310efe530d97c46fe324c0a669))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [4.3.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@4.3.3...@pie-element/rubric-configure@4.3.4) (2025-02-19)
|
|
7
18
|
|
|
8
19
|
|
package/configure/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "4.3.
|
|
4
|
+
"version": "4.3.5",
|
|
5
5
|
"description": "Rubric authoring view",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"author": "Pie Framework Authors",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@material-ui/core": "^3.9.2",
|
|
10
10
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
11
|
-
"@pie-lib/pie-toolbox": "2.9.
|
|
11
|
+
"@pie-lib/pie-toolbox": "2.9.5",
|
|
12
12
|
"debug": "^4.1.1",
|
|
13
13
|
"react": "^16.8.6",
|
|
14
14
|
"react-dom": "^16.8.6"
|
package/controller/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
|
+
## [3.0.23](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-controller@3.0.22...@pie-element/rubric-controller@3.0.23) (2025-02-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update pie-lib/pie-toolbox PD-4820, PD-4766 ([7ccdb40](https://github.com/pie-framework/pie-elements/commit/7ccdb405614f1c310efe530d97c46fe324c0a669))
|
|
12
|
+
* **rubric:** fix validation in rubric PD-4833 ([c5fbc60](https://github.com/pie-framework/pie-elements/commit/c5fbc60c0f2b9322ce27f3aecd48baa2e5163863))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [3.0.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-controller@3.0.21...@pie-element/rubric-controller@3.0.22) (2025-02-19)
|
|
7
19
|
|
|
8
20
|
|
package/controller/lib/index.js
CHANGED
|
@@ -32,17 +32,11 @@ function markupToText(s) {
|
|
|
32
32
|
} // IMPORTANT! If you make any changes to this function, please make sure you also update complex-rubric/controller/validateSimpleRubric function!“.
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
function validate(model
|
|
36
|
-
var points = model.points
|
|
37
|
-
excludeZero = model.excludeZero;
|
|
35
|
+
function validate(model) {
|
|
36
|
+
var points = model.points;
|
|
38
37
|
var errors = {};
|
|
39
38
|
var pointsDescriptorsErrors = {};
|
|
40
39
|
(points || []).forEach(function (point, index) {
|
|
41
|
-
if (index === 0 && excludeZero) {
|
|
42
|
-
// if excludeZero is true, the 0 point is not displayed, so it should not be validated
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
40
|
if (!point || point === '<div></div>') {
|
|
47
41
|
pointsDescriptorsErrors[index] = 'Points descriptors cannot be empty.';
|
|
48
42
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["normalize","model","defaults","session","env","Promise","resolve","modelResult","role","markupToText","s","replace","validate","
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["normalize","model","defaults","session","env","Promise","resolve","modelResult","role","markupToText","s","replace","validate","points","errors","pointsDescriptorsErrors","forEach","point","index","identicalPointDescr","slice","some","p","Object","keys","length"],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD;AAAA,yCAAiBC,oBAAjB,GAA8BD,KAA9B;AAAA,CAAlB;;AAEO,SAASA,KAAT,CAAeA,KAAf,EAAsBE,OAAtB,EAA+BC,GAA/B,EAAoC;AACzC,SAAO,IAAIC,OAAJ,CAAY,UAACC,OAAD,EAAa;AAC9B,QAAMC,WAAW,GAAGP,SAAS,CAACC,KAAK,IAAI,EAAV,CAA7B;AAEAK,IAAAA,OAAO,CAACF,GAAG,IAAIA,GAAG,CAACI,IAAX,IAAmBJ,GAAG,CAACI,IAAJ,KAAa,YAAhC,GAA+CD,WAA/C,GAA6D,EAA9D,CAAP;AACD,GAJM,CAAP;AAKD;;AAED,SAASE,YAAT,CAAsBC,CAAtB,EAAyB;AACvB,SAAO,CAACA,CAAC,IAAI,EAAN,EAAUC,OAAV,CAAkB,eAAlB,EAAmC,EAAnC,CAAP;AACD,C,CAED;;;AACO,SAASC,QAAT,CAAkBX,KAAlB,EAAyB;AAC9B,MAAQY,MAAR,GAAmBZ,KAAnB,CAAQY,MAAR;AACA,MAAMC,MAAM,GAAG,EAAf;AACA,MAAMC,uBAAuB,GAAG,EAAhC;AAEA,GAACF,MAAM,IAAI,EAAX,EAAeG,OAAf,CAAuB,UAACC,KAAD,EAAQC,KAAR,EAAkB;AAEvC,QAAI,CAACD,KAAD,IAAUA,KAAK,KAAK,aAAxB,EAAuC;AACrCF,MAAAA,uBAAuB,CAACG,KAAD,CAAvB,GAAiC,qCAAjC;AACD,KAFD,MAEO;AACL,UAAMC,mBAAmB,GAAGN,MAAM,CAACO,KAAP,CAAaF,KAAK,GAAG,CAArB,EAAwBG,IAAxB,CAA6B,UAACC,CAAD;AAAA,eAAOb,YAAY,CAACa,CAAD,CAAZ,KAAoBb,YAAY,CAACQ,KAAD,CAAvC;AAAA,OAA7B,CAA5B;;AAEA,UAAIE,mBAAJ,EAAyB;AACvBJ,QAAAA,uBAAuB,CAACG,KAAD,CAAvB,GAAiC,sCAAjC;AACD;AACF;AACF,GAXD;;AAaA,MAAIK,MAAM,CAACC,IAAP,CAAYT,uBAAZ,EAAqCU,MAArC,GAA8C,CAAlD,EAAqD;AACnDX,IAAAA,MAAM,CAACC,uBAAP,GAAiCA,uBAAjC;AACD;;AAED,SAAOD,MAAP;AACD","sourcesContent":["import defaults from './defaults';\n\nconst normalize = (model) => ({ ...defaults, ...model });\n\nexport function model(model, session, env) {\n return new Promise((resolve) => {\n const modelResult = normalize(model || {});\n\n resolve(env && env.role && env.role === 'instructor' ? modelResult : {});\n });\n}\n\nfunction markupToText(s) {\n return (s || '').replace(/(<([^>]+)>)/gi, '');\n}\n\n// IMPORTANT! If you make any changes to this function, please make sure you also update complex-rubric/controller/validateSimpleRubric function!“.\nexport function validate(model) {\n const { points } = model;\n const errors = {};\n const pointsDescriptorsErrors = {};\n\n (points || []).forEach((point, index) => {\n\n if (!point || point === '<div></div>') {\n pointsDescriptorsErrors[index] = 'Points descriptors cannot be empty.';\n } else {\n const identicalPointDescr = points.slice(index + 1).some((p) => markupToText(p) === markupToText(point));\n\n if (identicalPointDescr) {\n pointsDescriptorsErrors[index] = 'Points descriptors should be unique.';\n }\n }\n });\n\n if (Object.keys(pointsDescriptorsErrors).length > 0) {\n errors.pointsDescriptorsErrors = pointsDescriptorsErrors;\n }\n\n return errors;\n}\n"],"file":"index.js"}
|
package/controller/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric-controller",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.23",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "./node_modules/.bin/jest"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@pie-lib/pie-toolbox": "2.9.
|
|
10
|
+
"@pie-lib/pie-toolbox": "2.9.5",
|
|
11
11
|
"lodash": "^4.17.15"
|
|
12
12
|
}
|
|
13
13
|
}
|
package/controller/src/index.js
CHANGED
|
@@ -15,16 +15,12 @@ function markupToText(s) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
// IMPORTANT! If you make any changes to this function, please make sure you also update complex-rubric/controller/validateSimpleRubric function!“.
|
|
18
|
-
export function validate(model
|
|
19
|
-
const { points
|
|
18
|
+
export function validate(model) {
|
|
19
|
+
const { points } = model;
|
|
20
20
|
const errors = {};
|
|
21
21
|
const pointsDescriptorsErrors = {};
|
|
22
22
|
|
|
23
23
|
(points || []).forEach((point, index) => {
|
|
24
|
-
if (index === 0 && excludeZero) {
|
|
25
|
-
// if excludeZero is true, the 0 point is not displayed, so it should not be validated
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
24
|
|
|
29
25
|
if (!point || point === '<div></div>') {
|
|
30
26
|
pointsDescriptorsErrors[index] = 'Points descriptors cannot be empty.';
|
package/module/configure.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.
|
|
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@5.10.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.4/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@5.10.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/module/controller.js
CHANGED
|
@@ -85,17 +85,11 @@ function markupToText(s) {
|
|
|
85
85
|
} // IMPORTANT! If you make any changes to this function, please make sure you also update complex-rubric/controller/validateSimpleRubric function!“.
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
function validate(model
|
|
89
|
-
var points = model.points
|
|
90
|
-
excludeZero = model.excludeZero;
|
|
88
|
+
function validate(model) {
|
|
89
|
+
var points = model.points;
|
|
91
90
|
var errors = {};
|
|
92
91
|
var pointsDescriptorsErrors = {};
|
|
93
92
|
(points || []).forEach(function (point, index) {
|
|
94
|
-
if (index === 0 && excludeZero) {
|
|
95
|
-
// if excludeZero is true, the 0 point is not displayed, so it should not be validated
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
93
|
if (!point || point === '<div></div>') {
|
|
100
94
|
pointsDescriptorsErrors[index] = 'Points descriptors cannot be empty.';
|
|
101
95
|
} else {
|
package/module/element.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.4/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.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/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.4/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.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/rubric",
|
|
3
|
-
"version": "4.4.5
|
|
3
|
+
"version": "4.4.5",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "src/index.js",
|
|
6
6
|
"description": "Rubric Scoring Interaction",
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@material-ui/core": "^3.9.2",
|
|
13
|
-
"@pie-lib/pie-toolbox": "2.9.
|
|
13
|
+
"@pie-lib/pie-toolbox": "2.9.5",
|
|
14
14
|
"prop-types": "^15.7.2"
|
|
15
15
|
},
|
|
16
16
|
"author": "pie framework developers",
|
|
17
17
|
"license": "ISC",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "a765ec82fb15f75b58c3f626c7728470813c89bc",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|