@pie-element/rubric 8.2.2-beta.4 → 8.2.2-beta.6
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 +8 -0
- package/configure/CHANGELOG.md +8 -0
- package/configure/package.json +4 -4
- package/controller/CHANGELOG.md +8 -0
- package/controller/package.json +1 -1
- package/package.json +2 -2
- package/configure/lib/defaults.js +0 -70
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -136
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -103
- package/configure/lib/main.js.map +0 -1
- package/controller/lib/defaults.js +0 -15
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -46
- package/controller/lib/index.js.map +0 -1
- package/lib/index.js +0 -93
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -208
- package/lib/main.js.map +0 -1
- package/lib/print.js +0 -71
- package/lib/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -73
- package/module/demo.js +0 -33
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -14
- package/module/print-demo.js +0 -71
- package/module/print.html +0 -18
- package/module/print.js +0 -1
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
|
+
## [8.2.2-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@8.2.2-beta.5...@pie-element/rubric@8.2.2-beta.6) (2026-09-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/rubric
|
|
9
|
+
|
|
10
|
+
## [8.2.2-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@8.2.2-beta.4...@pie-element/rubric@8.2.2-beta.5) (2026-09-17)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @pie-element/rubric
|
|
13
|
+
|
|
6
14
|
## [8.2.2-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@8.2.2-beta.3...@pie-element/rubric@8.2.2-beta.4) (2026-09-11)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-element/rubric
|
package/configure/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
|
+
# [7.4.0-beta.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@7.4.0-beta.11...@pie-element/rubric-configure@7.4.0-beta.12) (2026-09-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/rubric-configure
|
|
9
|
+
|
|
10
|
+
# [7.4.0-beta.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@7.4.0-beta.10...@pie-element/rubric-configure@7.4.0-beta.11) (2026-09-17)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @pie-element/rubric-configure
|
|
13
|
+
|
|
6
14
|
# [7.4.0-beta.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@7.4.0-beta.9...@pie-element/rubric-configure@7.4.0-beta.10) (2026-09-11)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-element/rubric-configure
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "7.4.0-beta.
|
|
4
|
+
"version": "7.4.0-beta.12",
|
|
5
5
|
"description": "Rubric authoring view",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"author": "Pie Framework Authors",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"@mui/icons-material": "^7.3.4",
|
|
12
12
|
"@mui/material": "^7.3.4",
|
|
13
13
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
14
|
-
"@pie-lib/config-ui": "13.
|
|
15
|
-
"@pie-lib/editable-html-tip-tap": "2.
|
|
14
|
+
"@pie-lib/config-ui": "13.0.22-beta.1",
|
|
15
|
+
"@pie-lib/editable-html-tip-tap": "2.1.20-beta.1",
|
|
16
16
|
"@pie-lib/render-ui": "6.1.3",
|
|
17
|
-
"@pie-lib/rubric": "2.
|
|
17
|
+
"@pie-lib/rubric": "2.0.22-beta.1",
|
|
18
18
|
"debug": "^4.1.1",
|
|
19
19
|
"react": "18.3.1",
|
|
20
20
|
"react-dom": "18.3.1"
|
package/controller/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.3.0-beta.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-controller@6.3.0-beta.11...@pie-element/rubric-controller@6.3.0-beta.12) (2026-09-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/rubric-controller
|
|
9
|
+
|
|
10
|
+
# [6.3.0-beta.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-controller@6.3.0-beta.10...@pie-element/rubric-controller@6.3.0-beta.11) (2026-09-17)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @pie-element/rubric-controller
|
|
13
|
+
|
|
6
14
|
# [6.3.0-beta.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-controller@6.3.0-beta.9...@pie-element/rubric-controller@6.3.0-beta.10) (2026-09-11)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-element/rubric-controller
|
package/controller/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric",
|
|
3
3
|
"repository": "pie-framework/pie-elements",
|
|
4
|
-
"version": "8.2.2-beta.
|
|
4
|
+
"version": "8.2.2-beta.6",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"author": "pie framework developers",
|
|
32
32
|
"license": "ISC",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "c6bbb21417c58eaf8f617143437fb3ff85ae1cb4",
|
|
34
34
|
"scripts": {
|
|
35
35
|
"postpublish": "../../scripts/postpublish"
|
|
36
36
|
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = exports.default = {
|
|
8
|
-
model: {
|
|
9
|
-
points: ['', '', '', ''],
|
|
10
|
-
sampleAnswers: [null, null, null, null],
|
|
11
|
-
maxPoints: 3,
|
|
12
|
-
excludeZero: false,
|
|
13
|
-
excludeZeroEnabled: true,
|
|
14
|
-
maxPointsEnabled: true
|
|
15
|
-
},
|
|
16
|
-
configuration: {
|
|
17
|
-
baseInputConfiguration: {
|
|
18
|
-
h3: {
|
|
19
|
-
disabled: true
|
|
20
|
-
},
|
|
21
|
-
audio: {
|
|
22
|
-
disabled: false
|
|
23
|
-
},
|
|
24
|
-
video: {
|
|
25
|
-
disabled: false
|
|
26
|
-
},
|
|
27
|
-
image: {
|
|
28
|
-
disabled: false
|
|
29
|
-
},
|
|
30
|
-
textAlign: {
|
|
31
|
-
disabled: true
|
|
32
|
-
},
|
|
33
|
-
showParagraphs: {
|
|
34
|
-
disabled: false
|
|
35
|
-
},
|
|
36
|
-
separateParagraphs: {
|
|
37
|
-
disabled: true
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
rubriclessInstruction: {
|
|
41
|
-
inputConfiguration: {
|
|
42
|
-
audio: {
|
|
43
|
-
disabled: false
|
|
44
|
-
},
|
|
45
|
-
video: {
|
|
46
|
-
disabled: false
|
|
47
|
-
},
|
|
48
|
-
image: {
|
|
49
|
-
disabled: false
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
showExcludeZero: {
|
|
54
|
-
settings: true,
|
|
55
|
-
label: 'Ability to exclude zero'
|
|
56
|
-
},
|
|
57
|
-
showMaxPoint: {
|
|
58
|
-
settings: true,
|
|
59
|
-
label: 'Show max points dropdown'
|
|
60
|
-
},
|
|
61
|
-
settingsPanelDisabled: false,
|
|
62
|
-
// width: '500px'
|
|
63
|
-
mathMlOptions: {
|
|
64
|
-
mmlOutput: false,
|
|
65
|
-
mmlEditing: false
|
|
66
|
-
},
|
|
67
|
-
maxMaxPoints: 9
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["model","points","sampleAnswers","maxPoints","excludeZero","excludeZeroEnabled","maxPointsEnabled","configuration","baseInputConfiguration","h3","disabled","audio","video","image","textAlign","showParagraphs","separateParagraphs","rubriclessInstruction","inputConfiguration","showExcludeZero","settings","label","showMaxPoint","settingsPanelDisabled","mathMlOptions","mmlOutput","mmlEditing","maxMaxPoints"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n model: {\n points: ['', '', '', ''],\n sampleAnswers: [null, null, null, null],\n maxPoints: 3,\n excludeZero: false,\n excludeZeroEnabled: true,\n maxPointsEnabled: true,\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n rubriclessInstruction: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n showExcludeZero: {\n settings: true,\n label: 'Ability to exclude zero',\n },\n showMaxPoint: {\n settings: true,\n label: 'Show max points dropdown',\n },\n settingsPanelDisabled: false,\n // width: '500px'\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n maxMaxPoints: 9,\n },\n};\n"],"mappings":";;;;;;iCAAe;EACbA,KAAK,EAAE;IACLC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACxBC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACvCC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAE,KAAK;IAClBC,kBAAkB,EAAE,IAAI;IACxBC,gBAAgB,EAAE;EACpB,CAAC;EACDC,aAAa,EAAE;IACbC,sBAAsB,EAAE;MACtBC,EAAE,EAAE;QAAEC,QAAQ,EAAE;MAAK,CAAC;MACtBC,KAAK,EAAE;QAAED,QAAQ,EAAE;MAAM,CAAC;MAC1BE,KAAK,EAAE;QAAEF,QAAQ,EAAE;MAAM,CAAC;MAC1BG,KAAK,EAAE;QAAEH,QAAQ,EAAE;MAAM,CAAC;MAC1BI,SAAS,EAAE;QAAEJ,QAAQ,EAAE;MAAK,CAAC;MAC7BK,cAAc,EAAE;QAAEL,QAAQ,EAAE;MAAM,CAAC;MACnCM,kBAAkB,EAAE;QAAEN,QAAQ,EAAE;MAAK;IACvC,CAAC;IACDO,qBAAqB,EAAE;MACrBC,kBAAkB,EAAE;QAClBP,KAAK,EAAE;UAAED,QAAQ,EAAE;QAAM,CAAC;QAC1BE,KAAK,EAAE;UAAEF,QAAQ,EAAE;QAAM,CAAC;QAC1BG,KAAK,EAAE;UAAEH,QAAQ,EAAE;QAAM;MAC3B;IACF,CAAC;IACDS,eAAe,EAAE;MACfC,QAAQ,EAAE,IAAI;MACdC,KAAK,EAAE;IACT,CAAC;IACDC,YAAY,EAAE;MACZF,QAAQ,EAAE,IAAI;MACdC,KAAK,EAAE;IACT,CAAC;IACDE,qBAAqB,EAAE,KAAK;IAC5B;IACAC,aAAa,EAAE;MACbC,SAAS,EAAE,KAAK;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;EAChB;AACF,CAAC","ignoreList":[]}
|
package/configure/lib/index.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _pieConfigureEvents = require("@pie-framework/pie-configure-events");
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _client = require("react-dom/client");
|
|
12
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
13
|
-
var _main = _interopRequireDefault(require("./main"));
|
|
14
|
-
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
15
|
-
const modelWithDefaults = m => ({
|
|
16
|
-
..._defaults.default.model,
|
|
17
|
-
...m
|
|
18
|
-
});
|
|
19
|
-
const configurationWithDefaults = c => ({
|
|
20
|
-
..._defaults.default.configuration,
|
|
21
|
-
...c
|
|
22
|
-
});
|
|
23
|
-
class RubricElement extends HTMLElement {
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
(0, _defineProperty2.default)(this, "updateModelAccordingToReceivedProps", nextModel => {
|
|
27
|
-
const currentModel = {
|
|
28
|
-
...this._model
|
|
29
|
-
};
|
|
30
|
-
if (!nextModel) {
|
|
31
|
-
return currentModel;
|
|
32
|
-
}
|
|
33
|
-
const validatedModel = {
|
|
34
|
-
...nextModel
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// excludeZero should be false and disabled when maxPoints is 1
|
|
38
|
-
if (validatedModel.maxPoints === 1) {
|
|
39
|
-
validatedModel.excludeZero = false;
|
|
40
|
-
}
|
|
41
|
-
const {
|
|
42
|
-
maxPoints,
|
|
43
|
-
excludeZero
|
|
44
|
-
} = validatedModel || {};
|
|
45
|
-
validatedModel.points = validatedModel.points ? [...validatedModel.points] : [];
|
|
46
|
-
validatedModel.sampleAnswers = validatedModel.sampleAnswers ? [...validatedModel.sampleAnswers] : [];
|
|
47
|
-
const howManyPointsShouldHave = excludeZero ? maxPoints : maxPoints + 1;
|
|
48
|
-
const howManyPointsDoesItHave = validatedModel.points.length;
|
|
49
|
-
const excludeZeroChanged = currentModel?.excludeZero !== nextModel?.excludeZero;
|
|
50
|
-
const maxPointsChanged = currentModel?.maxPoints !== nextModel?.maxPoints;
|
|
51
|
-
if (howManyPointsDoesItHave < howManyPointsShouldHave) {
|
|
52
|
-
if (excludeZeroChanged && !excludeZero) {
|
|
53
|
-
validatedModel.points = ['', ...validatedModel.points];
|
|
54
|
-
validatedModel.sampleAnswers = [null, ...validatedModel.sampleAnswers];
|
|
55
|
-
}
|
|
56
|
-
if (maxPointsChanged) {
|
|
57
|
-
for (let i = 0; i < howManyPointsShouldHave - howManyPointsDoesItHave; i++) {
|
|
58
|
-
validatedModel.points.push('');
|
|
59
|
-
validatedModel.sampleAnswers.push(null);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
} else if (howManyPointsDoesItHave > howManyPointsShouldHave) {
|
|
63
|
-
if (excludeZeroChanged && excludeZero) {
|
|
64
|
-
validatedModel.points = validatedModel.points.slice(1);
|
|
65
|
-
validatedModel.sampleAnswers = validatedModel.sampleAnswers.slice(1);
|
|
66
|
-
}
|
|
67
|
-
if (maxPointsChanged) {
|
|
68
|
-
validatedModel.points = validatedModel.points.slice(0, howManyPointsShouldHave);
|
|
69
|
-
validatedModel.sampleAnswers = validatedModel.sampleAnswers.slice(0, howManyPointsShouldHave);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return validatedModel;
|
|
73
|
-
});
|
|
74
|
-
(0, _defineProperty2.default)(this, "onConfigurationChanged", c => {
|
|
75
|
-
this._configuration = configurationWithDefaults(c);
|
|
76
|
-
if (this._model) {
|
|
77
|
-
this.onModelChanged(this._model);
|
|
78
|
-
}
|
|
79
|
-
this._render();
|
|
80
|
-
});
|
|
81
|
-
this._root = null;
|
|
82
|
-
_debug.default.log('constructor called');
|
|
83
|
-
this._model = modelWithDefaults();
|
|
84
|
-
this._configuration = configurationWithDefaults();
|
|
85
|
-
this.onModelChanged = this.onModelChanged.bind(this);
|
|
86
|
-
this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
87
|
-
}
|
|
88
|
-
set model(m) {
|
|
89
|
-
this._model = this.updateModelAccordingToReceivedProps(modelWithDefaults(m));
|
|
90
|
-
this._render();
|
|
91
|
-
}
|
|
92
|
-
set configuration(c) {
|
|
93
|
-
this._configuration = configurationWithDefaults(c);
|
|
94
|
-
this._render();
|
|
95
|
-
}
|
|
96
|
-
onModelChanged(m) {
|
|
97
|
-
this._model = this.updateModelAccordingToReceivedProps(m);
|
|
98
|
-
this._render();
|
|
99
|
-
this.dispatchEvent(new _pieConfigureEvents.ModelUpdatedEvent(this._model, false));
|
|
100
|
-
}
|
|
101
|
-
insertImage(handler) {
|
|
102
|
-
this.dispatchEvent(new _pieConfigureEvents.InsertImageEvent(handler));
|
|
103
|
-
}
|
|
104
|
-
onDeleteImage(src, done) {
|
|
105
|
-
this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
|
|
106
|
-
}
|
|
107
|
-
connectedCallback() {
|
|
108
|
-
this._render();
|
|
109
|
-
}
|
|
110
|
-
_render() {
|
|
111
|
-
if (this._model) {
|
|
112
|
-
let element = /*#__PURE__*/_react.default.createElement(_main.default, {
|
|
113
|
-
model: this._model,
|
|
114
|
-
configuration: this._configuration,
|
|
115
|
-
onModelChanged: this.onModelChanged,
|
|
116
|
-
onConfigurationChanged: this.onConfigurationChanged,
|
|
117
|
-
imageSupport: {
|
|
118
|
-
add: this.insertImage.bind(this),
|
|
119
|
-
delete: this.onDeleteImage.bind(this)
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
if (!this._root) {
|
|
123
|
-
this._root = (0, _client.createRoot)(this);
|
|
124
|
-
}
|
|
125
|
-
this._root.render(element);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
disconnectedCallback() {
|
|
129
|
-
if (this._root) {
|
|
130
|
-
this._root.unmount();
|
|
131
|
-
this._root = null;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
exports.default = RubricElement;
|
|
136
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_pieConfigureEvents","require","_react","_interopRequireDefault","_client","_debug","_main","_defaults","modelWithDefaults","m","defaults","model","configurationWithDefaults","c","configuration","RubricElement","HTMLElement","constructor","_defineProperty2","default","nextModel","currentModel","_model","validatedModel","maxPoints","excludeZero","points","sampleAnswers","howManyPointsShouldHave","howManyPointsDoesItHave","length","excludeZeroChanged","maxPointsChanged","i","push","slice","_configuration","onModelChanged","_render","_root","debug","log","bind","onConfigurationChanged","updateModelAccordingToReceivedProps","dispatchEvent","ModelUpdatedEvent","insertImage","handler","InsertImageEvent","onDeleteImage","src","done","DeleteImageEvent","connectedCallback","element","React","createElement","Main","imageSupport","add","delete","createRoot","render","disconnectedCallback","unmount","exports"],"sources":["../src/index.js"],"sourcesContent":["import { ModelUpdatedEvent, InsertImageEvent, DeleteImageEvent } from '@pie-framework/pie-configure-events';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport debug from 'debug';\n\nimport Main from './main';\nimport defaults from './defaults';\n\nconst modelWithDefaults = (m) => ({ ...defaults.model, ...m });\n\nconst configurationWithDefaults = (c) => ({ ...defaults.configuration, ...c });\n\nexport default class RubricElement extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n debug.log('constructor called');\n this._model = modelWithDefaults();\n this._configuration = configurationWithDefaults();\n this.onModelChanged = this.onModelChanged.bind(this);\n this.onConfigurationChanged = this.onConfigurationChanged.bind(this);\n }\n\n updateModelAccordingToReceivedProps = (nextModel) => {\n const currentModel = { ...this._model };\n\n if (!nextModel) {\n return currentModel;\n }\n\n const validatedModel = { ...nextModel };\n\n // excludeZero should be false and disabled when maxPoints is 1\n if (validatedModel.maxPoints === 1) {\n validatedModel.excludeZero = false;\n }\n\n const { maxPoints, excludeZero } = validatedModel || {};\n\n validatedModel.points = validatedModel.points ? [...validatedModel.points] : [];\n validatedModel.sampleAnswers = validatedModel.sampleAnswers ? [...validatedModel.sampleAnswers] : [];\n\n const howManyPointsShouldHave = excludeZero ? maxPoints : maxPoints + 1;\n const howManyPointsDoesItHave = validatedModel.points.length;\n\n const excludeZeroChanged = currentModel?.excludeZero !== nextModel?.excludeZero;\n const maxPointsChanged = currentModel?.maxPoints !== nextModel?.maxPoints;\n\n if (howManyPointsDoesItHave < howManyPointsShouldHave) {\n if (excludeZeroChanged && !excludeZero) {\n validatedModel.points = ['', ...validatedModel.points];\n validatedModel.sampleAnswers = [null, ...validatedModel.sampleAnswers];\n }\n\n if (maxPointsChanged) {\n for (let i = 0; i < howManyPointsShouldHave - howManyPointsDoesItHave; i++) {\n validatedModel.points.push('');\n validatedModel.sampleAnswers.push(null);\n }\n }\n } else if (howManyPointsDoesItHave > howManyPointsShouldHave) {\n if (excludeZeroChanged && excludeZero) {\n validatedModel.points = validatedModel.points.slice(1);\n validatedModel.sampleAnswers = validatedModel.sampleAnswers.slice(1);\n }\n\n if (maxPointsChanged) {\n validatedModel.points = validatedModel.points.slice(0, howManyPointsShouldHave);\n validatedModel.sampleAnswers = validatedModel.sampleAnswers.slice(0, howManyPointsShouldHave);\n }\n }\n\n return validatedModel;\n };\n\n set model(m) {\n this._model = this.updateModelAccordingToReceivedProps(modelWithDefaults(m));\n this._render();\n }\n\n set configuration(c) {\n this._configuration = configurationWithDefaults(c);\n this._render();\n }\n\n onModelChanged(m) {\n this._model = this.updateModelAccordingToReceivedProps(m);\n this._render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n onConfigurationChanged = (c) => {\n this._configuration = configurationWithDefaults(c);\n\n if (this._model) {\n this.onModelChanged(this._model);\n }\n\n this._render();\n };\n\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (this._model) {\n let element = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this),\n },\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(element);\n }\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n this._root = null;\n }\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,KAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,SAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,MAAMO,iBAAiB,GAAIC,CAAC,KAAM;EAAE,GAAGC,iBAAQ,CAACC,KAAK;EAAE,GAAGF;AAAE,CAAC,CAAC;AAE9D,MAAMG,yBAAyB,GAAIC,CAAC,KAAM;EAAE,GAAGH,iBAAQ,CAACI,aAAa;EAAE,GAAGD;AAAE,CAAC,CAAC;AAE/D,MAAME,aAAa,SAASC,WAAW,CAAC;EACrDC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA,+CAS6BC,SAAS,IAAK;MACnD,MAAMC,YAAY,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AAE,IAAI,CAACb,WAAW,CAACL,IAAI,CAAC,IAAI,CAAC;UAChCmB,MAAM,EAAE,IAAI,CAACX,aAAa,CAACR,IAAI,CAAC,IAAI;QACtC;MACF,CAAC,CAAC;MAEF,IAAI,CAAC,IAAI,CAACH,KAAK,EAAE;QACf,IAAI,CAACA,KAAK,GAAG,IAAAuB,kBAAU,EAAC,IAAI,CAAC;MAC/B;MACA,IAAI,CAACvB,KAAK,CAACwB,MAAM,CAACR,OAAO,CAAC;IAC5B;EACF;EAEAS,oBAAoBA,CAAA,EAAG;IACrB,IAAI,IAAI,CAACzB,KAAK,EAAE;MACd,IAAI,CAACA,KAAK,CAAC0B,OAAO,CAAC,CAAC;MACpB,IAAI,CAAC1B,KAAK,GAAG,IAAI;IACnB;EACF;AACF;AAAC2B,OAAA,CAAA/C,OAAA,GAAAJ,aAAA","ignoreList":[]}
|
package/configure/lib/main.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _rubric = require("@pie-lib/rubric");
|
|
11
|
-
var _styles = require("@mui/material/styles");
|
|
12
|
-
var _configUi = require("@pie-lib/config-ui");
|
|
13
|
-
const {
|
|
14
|
-
Panel,
|
|
15
|
-
toggle
|
|
16
|
-
} = _configUi.settings;
|
|
17
|
-
const StyledDiv = (0, _styles.styled)('div')(({
|
|
18
|
-
theme,
|
|
19
|
-
width
|
|
20
|
-
}) => ({
|
|
21
|
-
maxWidth: width,
|
|
22
|
-
fontFamily: 'Cerebri Sans',
|
|
23
|
-
fontSize: theme.typography.fontSize
|
|
24
|
-
}));
|
|
25
|
-
class Main extends _react.default.Component {
|
|
26
|
-
constructor(...args) {
|
|
27
|
-
super(...args);
|
|
28
|
-
(0, _defineProperty2.default)(this, "verifyRubriclessModel", (m, config) => {
|
|
29
|
-
const {
|
|
30
|
-
rubricless = false
|
|
31
|
-
} = config || {};
|
|
32
|
-
return rubricless ? (({
|
|
33
|
-
points,
|
|
34
|
-
sampleAnswers,
|
|
35
|
-
...rest
|
|
36
|
-
}) => rest)(m) : m;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
render() {
|
|
40
|
-
const {
|
|
41
|
-
model,
|
|
42
|
-
configuration,
|
|
43
|
-
onConfigurationChanged,
|
|
44
|
-
onModelChanged,
|
|
45
|
-
imageSupport
|
|
46
|
-
} = this.props || {};
|
|
47
|
-
const {
|
|
48
|
-
baseInputConfiguration = {},
|
|
49
|
-
contentDimensions = {},
|
|
50
|
-
settingsPanelDisabled,
|
|
51
|
-
showExcludeZero = {},
|
|
52
|
-
showMaxPoint = {},
|
|
53
|
-
mathMlOptions = {},
|
|
54
|
-
rubricless = false,
|
|
55
|
-
rubriclessInstruction,
|
|
56
|
-
width
|
|
57
|
-
} = configuration || {};
|
|
58
|
-
|
|
59
|
-
// ensure to eliminate points and sampleAnswers in case of rubricless
|
|
60
|
-
const value = this.verifyRubriclessModel(model, configuration);
|
|
61
|
-
const {
|
|
62
|
-
extraCSSRules
|
|
63
|
-
} = model;
|
|
64
|
-
const panelProperties = {
|
|
65
|
-
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
66
|
-
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),
|
|
67
|
-
rubriclessInstructionEnabled: rubricless && rubriclessInstruction.settings && toggle(rubriclessInstruction.label)
|
|
68
|
-
};
|
|
69
|
-
const getPluginProps = props => {
|
|
70
|
-
return Object.assign({
|
|
71
|
-
...baseInputConfiguration
|
|
72
|
-
}, props || {});
|
|
73
|
-
};
|
|
74
|
-
return /*#__PURE__*/_react.default.createElement(_configUi.layout.ConfigLayout, {
|
|
75
|
-
extraCSSRules: extraCSSRules,
|
|
76
|
-
dimensions: contentDimensions,
|
|
77
|
-
hideSettings: settingsPanelDisabled,
|
|
78
|
-
settings: /*#__PURE__*/_react.default.createElement(Panel, {
|
|
79
|
-
model: model,
|
|
80
|
-
onChangeModel: onModelChanged,
|
|
81
|
-
configuration: configuration,
|
|
82
|
-
onChangeConfiguration: onConfigurationChanged,
|
|
83
|
-
pluginOpts: getPluginProps(rubriclessInstruction?.inputConfiguration),
|
|
84
|
-
groups: {
|
|
85
|
-
Properties: panelProperties
|
|
86
|
-
},
|
|
87
|
-
imageSupport: imageSupport
|
|
88
|
-
})
|
|
89
|
-
}, /*#__PURE__*/_react.default.createElement(StyledDiv, {
|
|
90
|
-
width: width
|
|
91
|
-
}, /*#__PURE__*/_react.default.createElement(_rubric.Authoring, {
|
|
92
|
-
value: value,
|
|
93
|
-
config: configuration,
|
|
94
|
-
onChange: onModelChanged,
|
|
95
|
-
mathMlOptions: mathMlOptions,
|
|
96
|
-
rubricless: rubricless,
|
|
97
|
-
pluginOpts: baseInputConfiguration,
|
|
98
|
-
imageSupport: imageSupport
|
|
99
|
-
})));
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
var _default = exports.default = Main;
|
|
103
|
-
//# sourceMappingURL=main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","names":["_react","_interopRequireDefault","require","_rubric","_styles","_configUi","Panel","toggle","settings","StyledDiv","styled","theme","width","maxWidth","fontFamily","fontSize","typography","Main","React","Component","constructor","args","_defineProperty2","default","m","config","rubricless","points","sampleAnswers","rest","render","model","configuration","onConfigurationChanged","onModelChanged","imageSupport","props","baseInputConfiguration","contentDimensions","settingsPanelDisabled","showExcludeZero","showMaxPoint","mathMlOptions","rubriclessInstruction","value","verifyRubriclessModel","extraCSSRules","panelProperties","excludeZeroEnabled","label","maxPointsEnabled","rubriclessInstructionEnabled","getPluginProps","Object","assign","createElement","layout","ConfigLayout","dimensions","hideSettings","onChangeModel","onChangeConfiguration","pluginOpts","inputConfiguration","groups","Properties","Authoring","onChange","_default","exports"],"sources":["../src/main.jsx"],"sourcesContent":["import React from 'react';\nimport { Authoring } from '@pie-lib/rubric';\nimport { styled } from '@mui/material/styles';\nimport { layout, settings } from '@pie-lib/config-ui';\n\nconst { Panel, toggle } = settings;\n\nconst StyledDiv = styled('div')(({ theme, width }) => ({\n maxWidth: width,\n fontFamily: 'Cerebri Sans',\n fontSize: theme.typography.fontSize,\n}));\n\nclass Main extends React.Component {\n verifyRubriclessModel = (m, config) => {\n const { rubricless = false } = config || {};\n return rubricless ? (({ points, sampleAnswers, ...rest }) => rest)(m) : m;\n };\n\n render() {\n const { model, configuration, onConfigurationChanged, onModelChanged, imageSupport } = this.props || {};\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n settingsPanelDisabled,\n showExcludeZero = {},\n showMaxPoint = {},\n mathMlOptions = {},\n rubricless = false,\n rubriclessInstruction,\n width,\n } = configuration || {};\n\n // ensure to eliminate points and sampleAnswers in case of rubricless\n const value = this.verifyRubriclessModel(model, configuration);\n const { extraCSSRules } = model;\n\n const panelProperties = {\n excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),\n maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),\n rubriclessInstructionEnabled: rubricless && rubriclessInstruction.settings && toggle(rubriclessInstruction.label),\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\n };\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n pluginOpts={getPluginProps(rubriclessInstruction?.inputConfiguration)}\n groups={{\n Properties: panelProperties,\n }}\n imageSupport={imageSupport}\n />\n } >\n <StyledDiv width={width}>\n <Authoring\n value={value}\n config={configuration}\n onChange={onModelChanged}\n mathMlOptions={mathMlOptions}\n rubricless={rubricless}\n pluginOpts={baseInputConfiguration}\n imageSupport={imageSupport}\n />\n </StyledDiv>\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default Main;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEA,MAAM;EAAEI,KAAK;EAAEC;AAAO,CAAC,GAAGC,kBAAQ;AAElC,MAAMC,SAAS,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;EAAEC,KAAK;EAAEC;AAAM,CAAC,MAAM;EACrDC,QAAQ,EAAED,KAAK;EACfE,UAAU,EAAE,cAAc;EAC1BC,QAAQ,EAAEJ,KAAK,CAACK,UAAU,CAACD;AAC7B,CAAC,CAAC,CAAC;AAEH,MAAME,IAAI,SAASC,cAAK,CAACC,SAAS,CAAC;EAAAC,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,iCACT,CAACC,CAAC,EAAEC,MAAM,KAAK;MACrC,MAAM;QAAEC,UAAU,GAAG;MAAM,CAAC,GAAGD,MAAM,IAAI,CAAC,CAAC;MAC3C,OAAOC,UAAU,GAAG,CAAC,CAAC;QAAEC,MAAM;QAAEC,aAAa;QAAE,GAAGC;MAAK,CAAC,KAAKA,IAAI,EAAEL,CAAC,CAAC,GAAGA,CAAC;IAC3E,CAAC;EAAA;EAEDM,MAAMA,CAAA,EAAG;IACP,MAAM;MAAEC,KAAK;MAAEC,aAAa;MAAEC,sBAAsB;MAAEC,cAAc;MAAEC;IAAa,CAAC,GAAG,IAAI,CAACC,KAAK,IAAI,CAAC,CAAC;IACvG,MAAM;MACJC,sBAAsB,GAAG,CAA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,CAACT,qBAAqB,EAAEoB,kBAAkB,CAAE;QACtEC,MAAM,EAAE;UACNC,UAAU,EAAElB;QACd,CAAE;QACFZ,YAAY,EAAEA;MAAa,CAC5B;IACF,gBACDnC,MAAA,CAAAuB,OAAA,CAAAgC,aAAA,CAAC9C,SAAS;MAACG,KAAK,EAAEA;IAAM,gBACtBZ,MAAA,CAAAuB,OAAA,CAAAgC,aAAA,CAACpD,OAAA,CAAA+D,SAAS;MACRtB,KAAK,EAAEA,KAAM;MACbnB,MAAM,EAAEO,aAAc;MACtBmC,QAAQ,EAAEjC,cAAe;MACzBQ,aAAa,EAAEA,aAAc;MAC7BhB,UAAU,EAAEA,UAAW;MACvBoC,UAAU,EAAEzB,sBAAuB;MACnCF,YAAY,EAAEA;IAAa,CAC5B,CACQ,CACQ,CAAC;EAE1B;AACF;AAAC,IAAAiC,QAAA,GAAAC,OAAA,CAAA9C,OAAA,GAEcN,IAAI","ignoreList":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = exports.default = {
|
|
8
|
-
points: ['', '', '', ''],
|
|
9
|
-
sampleAnswers: [null, null, null, null],
|
|
10
|
-
maxPoints: 3,
|
|
11
|
-
maxPointsEnabled: true,
|
|
12
|
-
excludeZero: false,
|
|
13
|
-
excludeZeroEnabled: true
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["points","sampleAnswers","maxPoints","maxPointsEnabled","excludeZero","excludeZeroEnabled"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n points: ['', '', '', ''],\n sampleAnswers: [null, null, null, null],\n maxPoints: 3,\n maxPointsEnabled: true,\n excludeZero: false,\n excludeZeroEnabled: true,\n};\n"],"mappings":";;;;;;iCAAe;EACbA,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;EACxBC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACvCC,SAAS,EAAE,CAAC;EACZC,gBAAgB,EAAE,IAAI;EACtBC,WAAW,EAAE,KAAK;EAClBC,kBAAkB,EAAE;AACtB,CAAC","ignoreList":[]}
|
package/controller/lib/index.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.model = model;
|
|
8
|
-
exports.validate = validate;
|
|
9
|
-
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
10
|
-
const normalize = model => ({
|
|
11
|
-
..._defaults.default,
|
|
12
|
-
...model
|
|
13
|
-
});
|
|
14
|
-
function model(model, session, env) {
|
|
15
|
-
return new Promise(resolve => {
|
|
16
|
-
const modelResult = normalize(model || {});
|
|
17
|
-
resolve(env && env.role && env.role === 'instructor' ? modelResult : {});
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function markupToText(s) {
|
|
21
|
-
return (s || '').replace(/(<([^>]+)>)/gi, '');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// IMPORTANT! If you make any changes to this function, please make sure you also update complex-rubric/controller/validateSimpleRubric function!“.
|
|
25
|
-
function validate(model) {
|
|
26
|
-
const {
|
|
27
|
-
points
|
|
28
|
-
} = model;
|
|
29
|
-
const errors = {};
|
|
30
|
-
const pointsDescriptorsErrors = {};
|
|
31
|
-
(points || []).forEach((point, index) => {
|
|
32
|
-
if (!point || point === '<div></div>') {
|
|
33
|
-
pointsDescriptorsErrors[index] = 'Points descriptors cannot be empty.';
|
|
34
|
-
} else {
|
|
35
|
-
const identicalPointDescr = points.slice(index + 1).some(p => markupToText(p) === markupToText(point));
|
|
36
|
-
if (identicalPointDescr) {
|
|
37
|
-
pointsDescriptorsErrors[index] = 'Points descriptors should be unique.';
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
if (Object.keys(pointsDescriptorsErrors).length > 0) {
|
|
42
|
-
errors.pointsDescriptorsErrors = pointsDescriptorsErrors;
|
|
43
|
-
}
|
|
44
|
-
return errors;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_defaults","_interopRequireDefault","require","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"],"sources":["../src/index.js"],"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"],"mappings":";;;;;;;;AAAA,IAAAA,SAAA,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K,MAAM,CAACC,IAAI,CAACT,uBAAuB,CAAC,CAACU,MAAM,GAAG,CAAC,EAAE;IACnDX,MAAM,CAACC,uBAAuB,GAAGA,uBAAuB;EAC1D;EAEA,OAAOD,MAAM;AACf","ignoreList":[]}
|
package/lib/index.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _main = _interopRequireDefault(require("./main"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _client = require("react-dom/client");
|
|
12
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
13
|
-
var _mathRendering = require("@pie-lib/math-rendering");
|
|
14
|
-
class RubricRender extends HTMLElement {
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
// React commits asynchronously, so a queueMicrotask(renderMath) can run before
|
|
18
|
-
// the LaTeX spans are in the DOM and leave raw LaTeX on first render — this is
|
|
19
|
-
// especially visible when rubric is mounted inside complex-rubric, which swaps
|
|
20
|
-
// its innerHTML and re-defines the inner element. Observing the DOM and
|
|
21
|
-
// typesetting after each commit keeps math in sync regardless of timing.
|
|
22
|
-
(0, _defineProperty2.default)(this, "_scheduleMathRender", () => {
|
|
23
|
-
if (this._mathRenderPending) return;
|
|
24
|
-
this._mathRenderPending = true;
|
|
25
|
-
requestAnimationFrame(() => {
|
|
26
|
-
if (this._mathObserver) {
|
|
27
|
-
this._mathObserver.disconnect();
|
|
28
|
-
}
|
|
29
|
-
(0, _mathRendering.renderMath)(this);
|
|
30
|
-
this._mathRenderPending = false;
|
|
31
|
-
setTimeout(() => {
|
|
32
|
-
if (this._mathObserver) {
|
|
33
|
-
this._mathObserver.observe(this, {
|
|
34
|
-
childList: true,
|
|
35
|
-
subtree: true
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}, 50);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
_debug.default.log('constructor called');
|
|
42
|
-
this.onModelChanged = this.onModelChanged.bind(this);
|
|
43
|
-
this._root = null;
|
|
44
|
-
this._mathObserver = null;
|
|
45
|
-
this._mathRenderPending = false;
|
|
46
|
-
}
|
|
47
|
-
_initMathObserver() {
|
|
48
|
-
if (this._mathObserver) return;
|
|
49
|
-
this._mathObserver = new MutationObserver(this._scheduleMathRender);
|
|
50
|
-
this._mathObserver.observe(this, {
|
|
51
|
-
childList: true,
|
|
52
|
-
subtree: true
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
_disconnectMathObserver() {
|
|
56
|
-
if (this._mathObserver) {
|
|
57
|
-
this._mathObserver.disconnect();
|
|
58
|
-
this._mathObserver = null;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
set model(s) {
|
|
62
|
-
this._model = s;
|
|
63
|
-
this._render();
|
|
64
|
-
}
|
|
65
|
-
onModelChanged(m) {
|
|
66
|
-
this._model = m;
|
|
67
|
-
this._render();
|
|
68
|
-
}
|
|
69
|
-
connectedCallback() {
|
|
70
|
-
this._initMathObserver();
|
|
71
|
-
this._render();
|
|
72
|
-
}
|
|
73
|
-
_render() {
|
|
74
|
-
if (this._model) {
|
|
75
|
-
this._initMathObserver();
|
|
76
|
-
const el = /*#__PURE__*/_react.default.createElement(_main.default, {
|
|
77
|
-
value: this._model
|
|
78
|
-
});
|
|
79
|
-
if (!this._root) {
|
|
80
|
-
this._root = (0, _client.createRoot)(this);
|
|
81
|
-
}
|
|
82
|
-
this._root.render(el);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
disconnectedCallback() {
|
|
86
|
-
this._disconnectMathObserver();
|
|
87
|
-
if (this._root) {
|
|
88
|
-
this._root.unmount();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
exports.default = RubricRender;
|
|
93
|
-
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_main","_interopRequireDefault","require","_react","_client","_debug","_mathRendering","RubricRender","HTMLElement","constructor","_defineProperty2","default","_mathRenderPending","requestAnimationFrame","_mathObserver","disconnect","renderMath","setTimeout","observe","childList","subtree","debug","log","onModelChanged","bind","_root","_initMathObserver","MutationObserver","_scheduleMathRender","_disconnectMathObserver","model","s","_model","_render","m","connectedCallback","el","React","createElement","Rubric","value","createRoot","render","disconnectedCallback","unmount","exports"],"sources":["../src/index.js"],"sourcesContent":["import Rubric from './main';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport debug from 'debug';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nexport default class RubricRender extends HTMLElement {\n constructor() {\n super();\n debug.log('constructor called');\n this.onModelChanged = this.onModelChanged.bind(this);\n this._root = null;\n this._mathObserver = null;\n this._mathRenderPending = false;\n }\n\n // React commits asynchronously, so a queueMicrotask(renderMath) can run before\n // the LaTeX spans are in the DOM and leave raw LaTeX on first render — this is\n // especially visible when rubric is mounted inside complex-rubric, which swaps\n // its innerHTML and re-defines the inner element. Observing the DOM and\n // typesetting after each commit keeps math in sync regardless of timing.\n _scheduleMathRender = () => {\n if (this._mathRenderPending) return;\n this._mathRenderPending = true;\n\n requestAnimationFrame(() => {\n if (this._mathObserver) {\n this._mathObserver.disconnect();\n }\n renderMath(this);\n this._mathRenderPending = false;\n setTimeout(() => {\n if (this._mathObserver) {\n this._mathObserver.observe(this, { childList: true, subtree: true });\n }\n }, 50);\n });\n };\n\n _initMathObserver() {\n if (this._mathObserver) return;\n this._mathObserver = new MutationObserver(this._scheduleMathRender);\n this._mathObserver.observe(this, { childList: true, subtree: true });\n }\n\n _disconnectMathObserver() {\n if (this._mathObserver) {\n this._mathObserver.disconnect();\n this._mathObserver = null;\n }\n }\n\n set model(s) {\n this._model = s;\n this._render();\n }\n\n onModelChanged(m) {\n this._model = m;\n this._render();\n }\n\n connectedCallback() {\n this._initMathObserver();\n this._render();\n }\n\n _render() {\n if (this._model) {\n this._initMathObserver();\n\n const el = React.createElement(Rubric, { value: this._model });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n }\n }\n\n disconnectedCallback() {\n this._disconnectMathObserver();\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAEe,MAAMK,YAAY,SAASC,WAAW,CAAC;EACpDC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAQT;IACA;IACA;IACA;IACA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,+BACsB,MAAM;MAC1B,IAAI,IAAI,CAACC,kBAAkB,EAAE;MAC7B,IAAI,CAACA,kBAAkB,GAAG,IAAI;MAE9BC,qBAAqB,CAAC,MAAM;QAC1B,IAAI,IAAI,CAACC,aAAa,EAAE;UACtB,IAAI,CAACA,aAAa,CAACC,UAAU,CAAC,CAAC;QACjC;QACA,IAAAC,yBAAU,EAAC,IAAI,CAAC;QAChB,IAAI,CAACJ,kBAAkB,GAAG,KAAK;QAC/BK,UAAU,CAAC,MAAM;UACf,IAAI,IAAI,CAACH,aAAa,EAAE;YACtB,IAAI,CAACA,aAAa,CAACI,OAAO,CAAC,IAAI,EAAE;cAAEC,SAAS,EAAE,IAAI;cAAEC,OAAO,EAAE;YAAK,CAAC,CAAC;UACtE;QACF,CAAC,EAAE,EAAE,CAAC;MACR,CAAC,CAAC;IACJ,CAAC;IA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