@pie-element/complex-rubric 5.3.4-next.3 → 6.0.0-beta.0
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/configure/lib/defaults.js +52 -24
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +103 -194
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +140 -199
- package/configure/lib/main.js.map +1 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +2491 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +55 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +2333 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +429 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +181 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +157 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +455 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +206 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +451 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +275 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +233 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +87 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +24 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +1571 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +18 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +158 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js +11 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +14 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +1628 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +1202 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +117 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +6 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +861 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +614 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +54 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +123 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +248 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +83 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +32 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +257 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +2774 -0
- package/configure/node_modules/@pie-element/rubric/README.md +3 -0
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +197 -0
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +2541 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +67 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +135 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +103 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/package.json +24 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/__tests__/index.test.jsx +178 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +42 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +139 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +87 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +17 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +1564 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/defaults.js +15 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +46 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/controller/package.json +12 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +33 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/defaults.js +8 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +41 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +712 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +532 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +8 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +2 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +391 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +281 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js +52 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js +210 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js +71 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/package.json +30 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +2641 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +49 -0
- package/configure/node_modules/@pie-element/rubric/src/index.js +48 -0
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +226 -0
- package/configure/node_modules/@pie-element/rubric/src/print.js +74 -0
- package/configure/node_modules/clsx/clsx.d.ts +6 -0
- package/configure/node_modules/clsx/dist/clsx.js +1 -0
- package/configure/node_modules/clsx/dist/clsx.m.js +1 -0
- package/configure/node_modules/clsx/dist/clsx.min.js +1 -0
- package/configure/node_modules/clsx/license +9 -0
- package/configure/node_modules/clsx/package.json +37 -0
- package/configure/node_modules/clsx/readme.md +88 -0
- package/configure/package.json +12 -9
- package/configure/src/__tests__/index.test.js +30 -5
- package/configure/src/__tests__/main.test.jsx +39 -23
- package/configure/src/index.js +13 -6
- package/configure/src/main.jsx +16 -15
- package/controller/lib/defaults.js +11 -15
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +117 -180
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js +1 -3
- package/controller/lib/utils.js.map +1 -1
- package/controller/package.json +1 -1
- package/lib/index.js +113 -204
- package/lib/index.js.map +1 -1
- package/lib/print.js +96 -190
- package/lib/print.js.map +1 -1
- package/package.json +10 -14
- package/src/__tests__/index.test.js +25 -7
- package/configure/src/__tests__/__snapshots__/main.test.jsx.snap +0 -193
- package/esm/configure.js +0 -15856
- package/esm/configure.js.map +0 -1
- package/esm/controller.js +0 -281
- package/esm/controller.js.map +0 -1
- package/esm/element.js +0 -179
- package/esm/element.js.map +0 -1
- package/esm/package.json +0 -3
- package/esm/print.js +0 -163
- package/esm/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -262
- package/module/demo.js +0 -221
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -22
- package/module/print-demo.js +0 -259
- package/module/print.html +0 -18
- package/module/print.js +0 -1
package/lib/print.js
CHANGED
|
@@ -1,223 +1,129 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
10
|
-
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
11
|
-
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
17
|
-
|
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
|
-
|
|
20
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
21
|
-
|
|
22
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
23
|
-
|
|
7
|
+
exports.default = void 0;
|
|
24
8
|
var _rubric = _interopRequireDefault(require("@pie-element/rubric"));
|
|
25
|
-
|
|
26
9
|
var _multiTraitRubric = _interopRequireDefault(require("@pie-element/multi-trait-rubric"));
|
|
27
|
-
|
|
28
10
|
var _rubric2 = require("@pie-lib/rubric");
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
(0, _inherits2["default"])(ComplexRubricSimple, _Rubric);
|
|
45
|
-
|
|
46
|
-
var _super = _createSuper(ComplexRubricSimple);
|
|
47
|
-
|
|
48
|
-
function ComplexRubricSimple() {
|
|
49
|
-
(0, _classCallCheck2["default"])(this, ComplexRubricSimple);
|
|
50
|
-
return _super.apply(this, arguments);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return (0, _createClass2["default"])(ComplexRubricSimple);
|
|
54
|
-
}(_rubric["default"]);
|
|
55
|
-
|
|
56
|
-
var ComplexRubricMultiTrait = /*#__PURE__*/function (_MultiTraitRubric) {
|
|
57
|
-
(0, _inherits2["default"])(ComplexRubricMultiTrait, _MultiTraitRubric);
|
|
58
|
-
|
|
59
|
-
var _super2 = _createSuper(ComplexRubricMultiTrait);
|
|
60
|
-
|
|
61
|
-
function ComplexRubricMultiTrait() {
|
|
62
|
-
(0, _classCallCheck2["default"])(this, ComplexRubricMultiTrait);
|
|
63
|
-
return _super2.apply(this, arguments);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return (0, _createClass2["default"])(ComplexRubricMultiTrait);
|
|
67
|
-
}(_multiTraitRubric["default"]);
|
|
68
|
-
|
|
69
|
-
var rubricTags = (_rubricTags = {}, (0, _defineProperty2["default"])(_rubricTags, _rubric2.RUBRIC_TYPES.SIMPLE_RUBRIC, "<".concat(RUBRIC_TAG_NAME, " id=\"simpleRubric\" />")), (0, _defineProperty2["default"])(_rubricTags, _rubric2.RUBRIC_TYPES.RUBRICLESS, "<".concat(RUBRIC_TAG_NAME, " id=\"rubricless\" />")), (0, _defineProperty2["default"])(_rubricTags, _rubric2.RUBRIC_TYPES.MULTI_TRAIT_RUBRIC, "<".concat(MULTI_TRAIT_RUBRIC_TAG_NAME, " id=\"multiTraitRubric\" />")), _rubricTags);
|
|
70
|
-
|
|
71
|
-
var preparePrintModel = function preparePrintModel(model, opts) {
|
|
72
|
-
var instr = opts.role === 'instructor';
|
|
73
|
-
|
|
11
|
+
// here it is actually using rubric/src/index.js, instead of using rubric/src/print.js
|
|
12
|
+
|
|
13
|
+
// here it is actually using multi-trait-rubric/src/index.js, instead of using multi-trait-rubric/src/print.js
|
|
14
|
+
|
|
15
|
+
const RUBRIC_TAG_NAME = 'complex-rubric-simple';
|
|
16
|
+
const MULTI_TRAIT_RUBRIC_TAG_NAME = 'complex-rubric-multi-trait';
|
|
17
|
+
class ComplexRubricSimple extends _rubric.default {}
|
|
18
|
+
class ComplexRubricMultiTrait extends _multiTraitRubric.default {}
|
|
19
|
+
const rubricTags = {
|
|
20
|
+
[_rubric2.RUBRIC_TYPES.SIMPLE_RUBRIC]: `<${RUBRIC_TAG_NAME} id="simpleRubric" />`,
|
|
21
|
+
[_rubric2.RUBRIC_TYPES.RUBRICLESS]: `<${RUBRIC_TAG_NAME} id="rubricless" />`,
|
|
22
|
+
[_rubric2.RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: `<${MULTI_TRAIT_RUBRIC_TAG_NAME} id="multiTraitRubric" />`
|
|
23
|
+
};
|
|
24
|
+
const preparePrintModel = (model, opts) => {
|
|
25
|
+
const instr = opts.role === 'instructor';
|
|
74
26
|
if (!instr) {
|
|
75
27
|
return {};
|
|
76
28
|
}
|
|
77
|
-
|
|
78
29
|
model.mode = 'evaluate';
|
|
79
30
|
model.animationsDisabled = true;
|
|
80
31
|
return model;
|
|
81
32
|
};
|
|
82
|
-
|
|
83
|
-
var defineRubrics = function defineRubrics() {
|
|
33
|
+
const defineRubrics = () => {
|
|
84
34
|
if (!customElements.get(RUBRIC_TAG_NAME)) {
|
|
85
35
|
customElements.define(RUBRIC_TAG_NAME, ComplexRubricSimple);
|
|
86
36
|
}
|
|
87
|
-
|
|
88
37
|
if (!customElements.get(MULTI_TRAIT_RUBRIC_TAG_NAME)) {
|
|
89
38
|
customElements.define(MULTI_TRAIT_RUBRIC_TAG_NAME, ComplexRubricMultiTrait);
|
|
90
39
|
}
|
|
91
40
|
};
|
|
92
|
-
|
|
93
41
|
defineRubrics();
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
function ComplexRubricPrint() {
|
|
101
|
-
var _this;
|
|
102
|
-
|
|
103
|
-
(0, _classCallCheck2["default"])(this, ComplexRubricPrint);
|
|
104
|
-
_this = _super3.call(this);
|
|
105
|
-
_this._model = {};
|
|
106
|
-
_this._type = _rubric2.RUBRIC_TYPES.SIMPLE_RUBRIC;
|
|
107
|
-
_this._options = null;
|
|
108
|
-
return _this;
|
|
42
|
+
class ComplexRubricPrint extends HTMLElement {
|
|
43
|
+
constructor() {
|
|
44
|
+
super();
|
|
45
|
+
this._model = {};
|
|
46
|
+
this._type = _rubric2.RUBRIC_TYPES.SIMPLE_RUBRIC;
|
|
47
|
+
this._options = null;
|
|
109
48
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
var oldType = this._type;
|
|
126
|
-
this.type = m.rubricType;
|
|
127
|
-
|
|
128
|
-
switch (this._type) {
|
|
129
|
-
case _rubric2.RUBRIC_TYPES.SIMPLE_RUBRIC:
|
|
130
|
-
default:
|
|
131
|
-
customElements.whenDefined(RUBRIC_TAG_NAME).then(function () {
|
|
132
|
-
_this2.setRubricModel(_this2.simpleRubric);
|
|
133
|
-
});
|
|
134
|
-
break;
|
|
135
|
-
|
|
136
|
-
case _rubric2.RUBRIC_TYPES.MULTI_TRAIT_RUBRIC:
|
|
137
|
-
customElements.whenDefined(MULTI_TRAIT_RUBRIC_TAG_NAME).then(function () {
|
|
138
|
-
_this2.setMultiTraitRubricModel(_this2.multiTraitRubric);
|
|
139
|
-
});
|
|
140
|
-
break;
|
|
141
|
-
|
|
142
|
-
case _rubric2.RUBRIC_TYPES.RUBRICLESS:
|
|
143
|
-
customElements.whenDefined(RUBRIC_TAG_NAME).then(function () {
|
|
144
|
-
_this2.setRubriclessModel(_this2.rubricless);
|
|
145
|
-
});
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (oldType !== this.type) {
|
|
150
|
-
this._render();
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}, {
|
|
154
|
-
key: "setRubricModel",
|
|
155
|
-
value: function setRubricModel(simpleRubric) {
|
|
156
|
-
if (this._model && this._model.rubrics && this._model.rubrics.simpleRubric) {
|
|
157
|
-
simpleRubric.model = preparePrintModel(this._model.rubrics.simpleRubric, this._options);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}, {
|
|
161
|
-
key: "setMultiTraitRubricModel",
|
|
162
|
-
value: function setMultiTraitRubricModel(multiTraitRubric) {
|
|
163
|
-
if (this._model && this._model.rubrics && this._model.rubrics.multiTraitRubric) {
|
|
164
|
-
var _ref = this._model.rubrics.multiTraitRubric || {},
|
|
165
|
-
scales = _ref.scales,
|
|
166
|
-
excludeZero = _ref.excludeZero;
|
|
167
|
-
|
|
168
|
-
var parsedScales = (scales || []).map(function (scale) {
|
|
169
|
-
return _objectSpread(_objectSpread({}, scale), {}, {
|
|
170
|
-
excludeZero: excludeZero
|
|
171
|
-
});
|
|
49
|
+
set type(t) {
|
|
50
|
+
this._type = t;
|
|
51
|
+
}
|
|
52
|
+
get type() {
|
|
53
|
+
return this._type;
|
|
54
|
+
}
|
|
55
|
+
set model(m) {
|
|
56
|
+
this._model = m;
|
|
57
|
+
const oldType = this._type;
|
|
58
|
+
this.type = m.rubricType;
|
|
59
|
+
switch (this._type) {
|
|
60
|
+
case _rubric2.RUBRIC_TYPES.SIMPLE_RUBRIC:
|
|
61
|
+
default:
|
|
62
|
+
customElements.whenDefined(RUBRIC_TAG_NAME).then(() => {
|
|
63
|
+
this.setRubricModel(this.simpleRubric);
|
|
172
64
|
});
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
65
|
+
break;
|
|
66
|
+
case _rubric2.RUBRIC_TYPES.MULTI_TRAIT_RUBRIC:
|
|
67
|
+
customElements.whenDefined(MULTI_TRAIT_RUBRIC_TAG_NAME).then(() => {
|
|
68
|
+
this.setMultiTraitRubricModel(this.multiTraitRubric);
|
|
177
69
|
});
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
rubricless.model = preparePrintModel(this._model.rubrics.rubricless, this._options);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}, {
|
|
188
|
-
key: "options",
|
|
189
|
-
set: function set(o) {
|
|
190
|
-
this._options = o;
|
|
191
|
-
}
|
|
192
|
-
}, {
|
|
193
|
-
key: "multiTraitRubric",
|
|
194
|
-
get: function get() {
|
|
195
|
-
return this.querySelector("".concat(MULTI_TRAIT_RUBRIC_TAG_NAME, "#multiTraitRubric"));
|
|
70
|
+
break;
|
|
71
|
+
case _rubric2.RUBRIC_TYPES.RUBRICLESS:
|
|
72
|
+
customElements.whenDefined(RUBRIC_TAG_NAME).then(() => {
|
|
73
|
+
this.setRubriclessModel(this.rubricless);
|
|
74
|
+
});
|
|
75
|
+
break;
|
|
196
76
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
get: function get() {
|
|
200
|
-
return this.querySelector("".concat(RUBRIC_TAG_NAME, "#simpleRubric"));
|
|
77
|
+
if (oldType !== this.type) {
|
|
78
|
+
this._render();
|
|
201
79
|
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
80
|
+
}
|
|
81
|
+
setRubricModel(simpleRubric) {
|
|
82
|
+
if (this._model && this._model.rubrics && this._model.rubrics.simpleRubric) {
|
|
83
|
+
simpleRubric.model = preparePrintModel(this._model.rubrics.simpleRubric, this._options);
|
|
206
84
|
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
85
|
+
}
|
|
86
|
+
setMultiTraitRubricModel(multiTraitRubric) {
|
|
87
|
+
if (this._model && this._model.rubrics && this._model.rubrics.multiTraitRubric) {
|
|
88
|
+
const {
|
|
89
|
+
scales,
|
|
90
|
+
excludeZero
|
|
91
|
+
} = this._model.rubrics.multiTraitRubric || {};
|
|
92
|
+
const parsedScales = (scales || []).map(scale => ({
|
|
93
|
+
...scale,
|
|
94
|
+
excludeZero
|
|
95
|
+
}));
|
|
96
|
+
multiTraitRubric.model = {
|
|
97
|
+
...preparePrintModel(this._model.rubrics.multiTraitRubric, this._options),
|
|
98
|
+
visible: true,
|
|
99
|
+
arrowsDisabled: true,
|
|
100
|
+
scales: parsedScales
|
|
101
|
+
};
|
|
211
102
|
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
103
|
+
}
|
|
104
|
+
setRubriclessModel(rubricless) {
|
|
105
|
+
if (this._model && this._model.rubrics && this._model.rubrics.rubricless) {
|
|
106
|
+
rubricless.model = preparePrintModel(this._model.rubrics.rubricless, this._options);
|
|
216
107
|
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
108
|
+
}
|
|
109
|
+
set options(o) {
|
|
110
|
+
this._options = o;
|
|
111
|
+
}
|
|
112
|
+
get multiTraitRubric() {
|
|
113
|
+
return this.querySelector(`${MULTI_TRAIT_RUBRIC_TAG_NAME}#multiTraitRubric`);
|
|
114
|
+
}
|
|
115
|
+
get simpleRubric() {
|
|
116
|
+
return this.querySelector(`${RUBRIC_TAG_NAME}#simpleRubric`);
|
|
117
|
+
}
|
|
118
|
+
get rubricless() {
|
|
119
|
+
return this.querySelector(`${RUBRIC_TAG_NAME}#rubricless`);
|
|
120
|
+
}
|
|
121
|
+
connectedCallback() {
|
|
122
|
+
this._render();
|
|
123
|
+
}
|
|
124
|
+
_render() {
|
|
125
|
+
this.innerHTML = rubricTags[this._type] || '';
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
var _default = exports.default = ComplexRubricPrint;
|
|
223
129
|
//# sourceMappingURL=print.js.map
|
package/lib/print.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"print.js","names":["_rubric","_interopRequireDefault","require","_multiTraitRubric","_rubric2","RUBRIC_TAG_NAME","MULTI_TRAIT_RUBRIC_TAG_NAME","ComplexRubricSimple","Rubric","ComplexRubricMultiTrait","MultiTraitRubric","rubricTags","RUBRIC_TYPES","SIMPLE_RUBRIC","RUBRICLESS","MULTI_TRAIT_RUBRIC","preparePrintModel","model","opts","instr","role","mode","animationsDisabled","defineRubrics","customElements","get","define","ComplexRubricPrint","HTMLElement","constructor","_model","_type","_options","type","t","m","oldType","rubricType","whenDefined","then","setRubricModel","simpleRubric","setMultiTraitRubricModel","multiTraitRubric","setRubriclessModel","rubricless","_render","rubrics","scales","excludeZero","parsedScales","map","scale","visible","arrowsDisabled","options","o","querySelector","connectedCallback","innerHTML","_default","exports","default"],"sources":["../src/print.js"],"sourcesContent":["// here it is actually using rubric/src/index.js, instead of using rubric/src/print.js\nimport Rubric from '@pie-element/rubric';\n// here it is actually using multi-trait-rubric/src/index.js, instead of using multi-trait-rubric/src/print.js\nimport MultiTraitRubric from '@pie-element/multi-trait-rubric';\nimport { RUBRIC_TYPES } from '@pie-lib/rubric';\n\nconst RUBRIC_TAG_NAME = 'complex-rubric-simple';\nconst MULTI_TRAIT_RUBRIC_TAG_NAME = 'complex-rubric-multi-trait';\n\nclass ComplexRubricSimple extends Rubric {}\nclass ComplexRubricMultiTrait extends MultiTraitRubric {}\n\nconst rubricTags = {\n [RUBRIC_TYPES.SIMPLE_RUBRIC]: `<${RUBRIC_TAG_NAME} id=\"simpleRubric\" />`,\n [RUBRIC_TYPES.RUBRICLESS]: `<${RUBRIC_TAG_NAME} id=\"rubricless\" />`,\n [RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: `<${MULTI_TRAIT_RUBRIC_TAG_NAME} id=\"multiTraitRubric\" />`,\n};\n\nconst preparePrintModel = (model, opts) => {\n const instr = opts.role === 'instructor';\n\n if (!instr) {\n return {};\n }\n\n model.mode = 'evaluate';\n model.animationsDisabled = true;\n\n return model;\n};\n\nconst defineRubrics = () => {\n if (!customElements.get(RUBRIC_TAG_NAME)) {\n customElements.define(RUBRIC_TAG_NAME, ComplexRubricSimple);\n }\n\n if (!customElements.get(MULTI_TRAIT_RUBRIC_TAG_NAME)) {\n customElements.define(MULTI_TRAIT_RUBRIC_TAG_NAME, ComplexRubricMultiTrait);\n }\n};\n\ndefineRubrics();\n\nclass ComplexRubricPrint extends HTMLElement {\n constructor() {\n super();\n this._model = {};\n this._type = RUBRIC_TYPES.SIMPLE_RUBRIC;\n this._options = null;\n }\n\n set type(t) {\n this._type = t;\n }\n\n get type() {\n return this._type;\n }\n\n set model(m) {\n this._model = m;\n const oldType = this._type;\n this.type = m.rubricType;\n\n switch (this._type) {\n case RUBRIC_TYPES.SIMPLE_RUBRIC:\n default:\n customElements.whenDefined(RUBRIC_TAG_NAME).then(() => {\n this.setRubricModel(this.simpleRubric);\n });\n break;\n case RUBRIC_TYPES.MULTI_TRAIT_RUBRIC:\n customElements.whenDefined(MULTI_TRAIT_RUBRIC_TAG_NAME).then(() => {\n this.setMultiTraitRubricModel(this.multiTraitRubric);\n });\n break;\n case RUBRIC_TYPES.RUBRICLESS:\n customElements.whenDefined(RUBRIC_TAG_NAME).then(() => {\n this.setRubriclessModel(this.rubricless);\n });\n break;\n }\n\n if (oldType !== this.type) {\n this._render();\n }\n }\n\n setRubricModel(simpleRubric) {\n if (this._model && this._model.rubrics && this._model.rubrics.simpleRubric) {\n simpleRubric.model = preparePrintModel(this._model.rubrics.simpleRubric, this._options);\n }\n }\n\n setMultiTraitRubricModel(multiTraitRubric) {\n if (this._model && this._model.rubrics && this._model.rubrics.multiTraitRubric) {\n const { scales, excludeZero } = this._model.rubrics.multiTraitRubric || {};\n const parsedScales = (scales || []).map((scale) => ({ ...scale, excludeZero }));\n\n multiTraitRubric.model = {\n ...preparePrintModel(this._model.rubrics.multiTraitRubric, this._options),\n visible: true,\n arrowsDisabled: true,\n scales: parsedScales,\n };\n }\n }\n\n setRubriclessModel(rubricless) {\n if (this._model && this._model.rubrics && this._model.rubrics.rubricless) {\n rubricless.model = preparePrintModel(this._model.rubrics.rubricless, this._options);\n }\n }\n\n set options(o) {\n this._options = o;\n }\n\n get multiTraitRubric() {\n return this.querySelector(`${MULTI_TRAIT_RUBRIC_TAG_NAME}#multiTraitRubric`);\n }\n\n get simpleRubric() {\n return this.querySelector(`${RUBRIC_TAG_NAME}#simpleRubric`);\n }\n\n get rubricless() {\n return this.querySelector(`${RUBRIC_TAG_NAME}#rubricless`);\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n this.innerHTML = rubricTags[this._type] || '';\n }\n}\n\nexport default ComplexRubricPrint;\n"],"mappings":"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","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/complex-rubric",
|
|
3
3
|
"repository": "pie-framework/pie-elements",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.0.0-beta.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@
|
|
10
|
-
"@
|
|
11
|
-
"@
|
|
9
|
+
"@emotion/react": "^11.14.0",
|
|
10
|
+
"@emotion/style": "^0.8.0",
|
|
11
|
+
"@mui/icons-material": "^7.3.4",
|
|
12
|
+
"@mui/material": "^7.3.4",
|
|
13
|
+
"@pie-element/multi-trait-rubric": "6.2.1-mui-update.1",
|
|
14
|
+
"@pie-element/rubric": "6.2.0-mui-update.2",
|
|
12
15
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
16
|
+
"@pie-lib/rubric": "0.28.4-next.0",
|
|
13
17
|
"classnames": "^2.2.5",
|
|
14
18
|
"debug": "^4.1.1",
|
|
15
19
|
"lodash": "^4.17.11",
|
|
16
20
|
"prop-types": "^15.7.2"
|
|
17
21
|
},
|
|
18
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "802d21e25bfd05e6c6f6913260dfb6a4ed28a274",
|
|
19
23
|
"scripts": {
|
|
20
24
|
"postpublish": "../../scripts/postpublish"
|
|
21
25
|
},
|
|
@@ -23,13 +27,5 @@
|
|
|
23
27
|
"module": "src/index.js",
|
|
24
28
|
"description": "Complex Rubric Scoring Interaction",
|
|
25
29
|
"author": "pie framework developers",
|
|
26
|
-
"license": "ISC"
|
|
27
|
-
"exports": {
|
|
28
|
-
".": "./src/index.js",
|
|
29
|
-
"./print": "./src/print.js",
|
|
30
|
-
"./esm": "./esm/element.js",
|
|
31
|
-
"./configure/esm": "./esm/configure.js",
|
|
32
|
-
"./controller/esm": "./esm/controller.js",
|
|
33
|
-
"./print/esm": "./esm/print.js"
|
|
34
|
-
}
|
|
30
|
+
"license": "ISC"
|
|
35
31
|
}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
jest.mock('@pie-element/rubric', () =>
|
|
2
|
-
|
|
1
|
+
jest.mock('@pie-element/rubric', () => {
|
|
2
|
+
class MockRubric {
|
|
3
|
+
constructor() {}
|
|
4
|
+
}
|
|
5
|
+
return MockRubric;
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
jest.mock('@pie-element/multi-trait-rubric', () => {
|
|
9
|
+
class MockMultiTraitRubric {
|
|
10
|
+
constructor() {}
|
|
11
|
+
}
|
|
12
|
+
return MockMultiTraitRubric;
|
|
13
|
+
});
|
|
14
|
+
|
|
3
15
|
jest.mock('@pie-lib/rubric', () => ({
|
|
4
16
|
RUBRIC_TYPES: {
|
|
5
17
|
SIMPLE_RUBRIC: 'simpleRubric',
|
|
@@ -204,14 +216,21 @@ describe('complex-rubric', () => {
|
|
|
204
216
|
|
|
205
217
|
beforeAll(() => {
|
|
206
218
|
Def = require('../index').default;
|
|
219
|
+
// Register the custom element for testing
|
|
220
|
+
if (!customElements.get('complex-rubric-test')) {
|
|
221
|
+
customElements.define('complex-rubric-test', Def);
|
|
222
|
+
}
|
|
207
223
|
});
|
|
208
224
|
|
|
209
225
|
beforeEach(() => {
|
|
210
|
-
el =
|
|
211
|
-
|
|
226
|
+
el = document.createElement('complex-rubric-test');
|
|
227
|
+
|
|
228
|
+
// Mock _render to avoid innerHTML issues in jsdom
|
|
229
|
+
el._render = jest.fn();
|
|
230
|
+
|
|
212
231
|
complexRubric = {
|
|
213
|
-
simpleRubric:
|
|
214
|
-
multiTraitRubric:
|
|
232
|
+
simpleRubric: document.createElement('div'),
|
|
233
|
+
multiTraitRubric: document.createElement('div'),
|
|
215
234
|
};
|
|
216
235
|
el.querySelector = jest.fn((s) => {
|
|
217
236
|
if (s === '#simpleRubric') {
|
|
@@ -220,7 +239,6 @@ describe('complex-rubric', () => {
|
|
|
220
239
|
return complexRubric.multiTraitRubric;
|
|
221
240
|
}
|
|
222
241
|
});
|
|
223
|
-
el.tagName = 'complex-rubric-element';
|
|
224
242
|
el.model = defaultModel;
|
|
225
243
|
});
|
|
226
244
|
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Main snapshot renders 1`] = `
|
|
4
|
-
<ConfigLayout
|
|
5
|
-
dimensions={Object {}}
|
|
6
|
-
hideSettings={true}
|
|
7
|
-
settings={null}
|
|
8
|
-
>
|
|
9
|
-
<RadioGroup
|
|
10
|
-
aria-label="rubric-type"
|
|
11
|
-
name="rubricType"
|
|
12
|
-
onChange={[Function]}
|
|
13
|
-
value="simpleRubric"
|
|
14
|
-
>
|
|
15
|
-
<WithStyles(WithFormControlContext(FormControlLabel))
|
|
16
|
-
classes={
|
|
17
|
-
Object {
|
|
18
|
-
"root": undefined,
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
control={
|
|
22
|
-
<WithStyles(Radio)
|
|
23
|
-
checked={true}
|
|
24
|
-
/>
|
|
25
|
-
}
|
|
26
|
-
key="0"
|
|
27
|
-
label="Simple Rubric"
|
|
28
|
-
value="simpleRubric"
|
|
29
|
-
/>
|
|
30
|
-
<WithStyles(WithFormControlContext(FormControlLabel))
|
|
31
|
-
classes={
|
|
32
|
-
Object {
|
|
33
|
-
"root": undefined,
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
control={
|
|
37
|
-
<WithStyles(Radio)
|
|
38
|
-
checked={false}
|
|
39
|
-
/>
|
|
40
|
-
}
|
|
41
|
-
key="1"
|
|
42
|
-
label="Multi Trait Rubric"
|
|
43
|
-
value="multiTraitRubric"
|
|
44
|
-
/>
|
|
45
|
-
<WithStyles(WithFormControlContext(FormControlLabel))
|
|
46
|
-
classes={
|
|
47
|
-
Object {
|
|
48
|
-
"root": undefined,
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
control={
|
|
52
|
-
<WithStyles(Radio)
|
|
53
|
-
checked={false}
|
|
54
|
-
/>
|
|
55
|
-
}
|
|
56
|
-
key="2"
|
|
57
|
-
value="rubricless"
|
|
58
|
-
/>
|
|
59
|
-
</RadioGroup>
|
|
60
|
-
<rubric-configure
|
|
61
|
-
id="simpleRubric"
|
|
62
|
-
key="simple-rubric"
|
|
63
|
-
/>
|
|
64
|
-
</ConfigLayout>
|
|
65
|
-
`;
|
|
66
|
-
|
|
67
|
-
exports[`Main snapshot renders multi trait rubric 1`] = `
|
|
68
|
-
<ConfigLayout
|
|
69
|
-
dimensions={Object {}}
|
|
70
|
-
hideSettings={true}
|
|
71
|
-
settings={null}
|
|
72
|
-
>
|
|
73
|
-
<RadioGroup
|
|
74
|
-
aria-label="rubric-type"
|
|
75
|
-
name="rubricType"
|
|
76
|
-
onChange={[Function]}
|
|
77
|
-
value="multiTraitRubric"
|
|
78
|
-
>
|
|
79
|
-
<WithStyles(WithFormControlContext(FormControlLabel))
|
|
80
|
-
classes={
|
|
81
|
-
Object {
|
|
82
|
-
"root": undefined,
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
control={
|
|
86
|
-
<WithStyles(Radio)
|
|
87
|
-
checked={false}
|
|
88
|
-
/>
|
|
89
|
-
}
|
|
90
|
-
key="0"
|
|
91
|
-
label="Simple Rubric"
|
|
92
|
-
value="simpleRubric"
|
|
93
|
-
/>
|
|
94
|
-
<WithStyles(WithFormControlContext(FormControlLabel))
|
|
95
|
-
classes={
|
|
96
|
-
Object {
|
|
97
|
-
"root": undefined,
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
control={
|
|
101
|
-
<WithStyles(Radio)
|
|
102
|
-
checked={true}
|
|
103
|
-
/>
|
|
104
|
-
}
|
|
105
|
-
key="1"
|
|
106
|
-
label="Multi Trait Rubric"
|
|
107
|
-
value="multiTraitRubric"
|
|
108
|
-
/>
|
|
109
|
-
<WithStyles(WithFormControlContext(FormControlLabel))
|
|
110
|
-
classes={
|
|
111
|
-
Object {
|
|
112
|
-
"root": undefined,
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
control={
|
|
116
|
-
<WithStyles(Radio)
|
|
117
|
-
checked={false}
|
|
118
|
-
/>
|
|
119
|
-
}
|
|
120
|
-
key="2"
|
|
121
|
-
value="rubricless"
|
|
122
|
-
/>
|
|
123
|
-
</RadioGroup>
|
|
124
|
-
<multi-trait-rubric-configure
|
|
125
|
-
id="multiTraitRubric"
|
|
126
|
-
key="multi-trait-rubric"
|
|
127
|
-
/>
|
|
128
|
-
</ConfigLayout>
|
|
129
|
-
`;
|
|
130
|
-
|
|
131
|
-
exports[`Main snapshot renders simple rubric 1`] = `
|
|
132
|
-
<ConfigLayout
|
|
133
|
-
dimensions={Object {}}
|
|
134
|
-
hideSettings={true}
|
|
135
|
-
settings={null}
|
|
136
|
-
>
|
|
137
|
-
<RadioGroup
|
|
138
|
-
aria-label="rubric-type"
|
|
139
|
-
name="rubricType"
|
|
140
|
-
onChange={[Function]}
|
|
141
|
-
value="simpleRubric"
|
|
142
|
-
>
|
|
143
|
-
<WithStyles(WithFormControlContext(FormControlLabel))
|
|
144
|
-
classes={
|
|
145
|
-
Object {
|
|
146
|
-
"root": undefined,
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
control={
|
|
150
|
-
<WithStyles(Radio)
|
|
151
|
-
checked={true}
|
|
152
|
-
/>
|
|
153
|
-
}
|
|
154
|
-
key="0"
|
|
155
|
-
label="Simple Rubric"
|
|
156
|
-
value="simpleRubric"
|
|
157
|
-
/>
|
|
158
|
-
<WithStyles(WithFormControlContext(FormControlLabel))
|
|
159
|
-
classes={
|
|
160
|
-
Object {
|
|
161
|
-
"root": undefined,
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
control={
|
|
165
|
-
<WithStyles(Radio)
|
|
166
|
-
checked={false}
|
|
167
|
-
/>
|
|
168
|
-
}
|
|
169
|
-
key="1"
|
|
170
|
-
label="Multi Trait Rubric"
|
|
171
|
-
value="multiTraitRubric"
|
|
172
|
-
/>
|
|
173
|
-
<WithStyles(WithFormControlContext(FormControlLabel))
|
|
174
|
-
classes={
|
|
175
|
-
Object {
|
|
176
|
-
"root": undefined,
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
control={
|
|
180
|
-
<WithStyles(Radio)
|
|
181
|
-
checked={false}
|
|
182
|
-
/>
|
|
183
|
-
}
|
|
184
|
-
key="2"
|
|
185
|
-
value="rubricless"
|
|
186
|
-
/>
|
|
187
|
-
</RadioGroup>
|
|
188
|
-
<rubric-configure
|
|
189
|
-
id="simpleRubric"
|
|
190
|
-
key="simple-rubric"
|
|
191
|
-
/>
|
|
192
|
-
</ConfigLayout>
|
|
193
|
-
`;
|