@pie-element/complex-rubric 3.7.10-next.87 → 3.8.1-next.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 +20 -0
- package/configure/CHANGELOG.md +19 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +257 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +2683 -0
- package/configure/node_modules/@pie-element/rubric/LICENSE.md +5 -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 +2484 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +68 -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 +197 -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 +162 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/authoring.js +573 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/authoring.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/index.js +24 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/point-menu.js +172 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/point-menu.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/package.json +20 -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 +129 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +89 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/authoring.jsx +449 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/index.js +9 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/point-menu.jsx +94 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +17 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +1510 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/defaults.js +16 -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 +59 -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 +94 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js +270 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js +114 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/module/configure.js +1 -0
- package/configure/node_modules/@pie-element/rubric/module/controller.js +113 -0
- package/configure/node_modules/@pie-element/rubric/module/demo.js +33 -0
- package/configure/node_modules/@pie-element/rubric/module/element.js +1 -0
- package/configure/node_modules/@pie-element/rubric/module/index.html +21 -0
- package/configure/node_modules/@pie-element/rubric/module/manifest.json +10 -0
- package/configure/node_modules/@pie-element/rubric/module/print-demo.js +71 -0
- package/configure/node_modules/@pie-element/rubric/module/print.html +18 -0
- package/configure/node_modules/@pie-element/rubric/module/print.js +1 -0
- package/configure/node_modules/@pie-element/rubric/package.json +27 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +1815 -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 +37 -0
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +219 -0
- package/configure/node_modules/@pie-element/rubric/src/print.js +63 -0
- package/configure/package.json +5 -5
- package/controller/CHANGELOG.md +18 -0
- package/controller/package.json +1 -1
- package/module/configure.js +1 -1
- package/module/element.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +5 -5
- package/module/print.html +1 -1
- package/module/print.js +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title>@pie-element/rubric@4.9.8-next.74</title>
|
|
6
|
+
<script
|
|
7
|
+
type="module"
|
|
8
|
+
src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
|
|
9
|
+
|
|
10
|
+
<link
|
|
11
|
+
href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
|
|
12
|
+
rel="stylesheet"
|
|
13
|
+
/>
|
|
14
|
+
<style>
|
|
15
|
+
html, body {
|
|
16
|
+
font-family: 'Roboto', sans-serif;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
<script type="module" src="./demo.js"></script>
|
|
20
|
+
</head>
|
|
21
|
+
</html>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import PrintElement from './print.js';
|
|
2
|
+
|
|
3
|
+
var generate = {};
|
|
4
|
+
|
|
5
|
+
generate.model = (id, element) => ({
|
|
6
|
+
id,
|
|
7
|
+
element,
|
|
8
|
+
points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],
|
|
9
|
+
sampleAnswers: [null, 'just right', 'not left', null],
|
|
10
|
+
maxPoints: 3,
|
|
11
|
+
excludeZero: false,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const { model } = generate;
|
|
15
|
+
|
|
16
|
+
var config = {
|
|
17
|
+
elements: {
|
|
18
|
+
'pie-rubric': '../..',
|
|
19
|
+
},
|
|
20
|
+
models: [model('1', 'pie-rubric')],
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// new init - just shows off print!
|
|
24
|
+
|
|
25
|
+
const init = async () => {
|
|
26
|
+
console.log('define the element...');
|
|
27
|
+
await Promise.all(
|
|
28
|
+
config.models.map(async (m) => {
|
|
29
|
+
try {
|
|
30
|
+
const printTag = `${m.element}-print`;
|
|
31
|
+
if (customElements.get(printTag)) {
|
|
32
|
+
return true;
|
|
33
|
+
} else {
|
|
34
|
+
customElements.define(printTag, PrintElement);
|
|
35
|
+
await customElements.whenDefined(printTag);
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
} catch (e) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
console.log('now apply the model...');
|
|
45
|
+
config.models.forEach((m) => {
|
|
46
|
+
const printTag = `${m.element}-print`;
|
|
47
|
+
const h3s = document.createElement('h3');
|
|
48
|
+
h3s.textContent = 'student mode';
|
|
49
|
+
document.body.appendChild(h3s);
|
|
50
|
+
const de = document.createElement(printTag);
|
|
51
|
+
document.body.appendChild(de);
|
|
52
|
+
de.options = {};
|
|
53
|
+
de.model = m;
|
|
54
|
+
|
|
55
|
+
const h3 = document.createElement('h3');
|
|
56
|
+
h3.textContent = 'instructor mode';
|
|
57
|
+
document.body.appendChild(h3);
|
|
58
|
+
const instr = document.createElement(printTag);
|
|
59
|
+
document.body.appendChild(instr);
|
|
60
|
+
instr.options = { mode: 'instructor' };
|
|
61
|
+
instr.model = JSON.parse(JSON.stringify(m));
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
init()
|
|
66
|
+
.then(() => {
|
|
67
|
+
console.log('ready');
|
|
68
|
+
})
|
|
69
|
+
.catch((e) => {
|
|
70
|
+
console.error(e);
|
|
71
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title>@pie-element/rubric@4.9.8-next.74</title>
|
|
6
|
+
<link
|
|
7
|
+
href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
|
|
8
|
+
rel="stylesheet"
|
|
9
|
+
/>
|
|
10
|
+
<style>
|
|
11
|
+
html, body {
|
|
12
|
+
font-family: 'Roboto', sans-serif;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
<script type="module" src="./print-demo.js"></script>
|
|
16
|
+
</head>
|
|
17
|
+
<body></body>
|
|
18
|
+
</html>
|