@pie-element/complex-rubric 2.10.1-next.1 → 2.10.1-next.11
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 +216 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/index.js +241 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/main.js +221 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +1383 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +5 -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 +1270 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +584 -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 +143 -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 +204 -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 +602 -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 +361 -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 +556 -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 +380 -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 +296 -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 +14 -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 +18 -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 +544 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +94 -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 +215 -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 +13 -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 +15 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +803 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +602 -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 +180 -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 +531 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +374 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +85 -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 +161 -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 +330 -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 +103 -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 +24 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +257 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +1640 -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 +1471 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +59 -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 +194 -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 +160 -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 +555 -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 +17 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/__tests__/index.test.jsx +173 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +39 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +127 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +87 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/authoring.jsx +427 -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 +536 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +51 -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 +13 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +31 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +42 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +382 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +292 -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 +226 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +161 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js +88 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js +187 -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/package.json +26 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +23003 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +50 -0
- package/configure/node_modules/@pie-element/rubric/src/index.js +34 -0
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +136 -0
- package/configure/node_modules/@pie-element/rubric/src/print.js +63 -0
- package/configure/package.json +2 -2
- package/controller/lib/defaults.js +134 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +307 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/lib/utils.js +13 -0
- package/controller/lib/utils.js.map +1 -0
- package/lib/index.js +232 -0
- package/lib/index.js.map +1 -0
- package/lib/print.js +201 -0
- package/lib/print.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {shallow, mount} from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Rubric from '../main';
|
|
4
|
+
import Link from '@material-ui/core/Link';
|
|
5
|
+
|
|
6
|
+
describe('rubric viewer', () => {
|
|
7
|
+
const wrapper = (extras) => {
|
|
8
|
+
const props = {
|
|
9
|
+
value: {
|
|
10
|
+
points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],
|
|
11
|
+
sampleAnswers: [null, 'just right', 'not left', null],
|
|
12
|
+
excludeZero: false,
|
|
13
|
+
...extras,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return mount(<Rubric {...props} />);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
describe('snapshot', () => {
|
|
21
|
+
it('renders', () => {
|
|
22
|
+
const w = wrapper();
|
|
23
|
+
expect(w).toMatchSnapshot();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
describe('expanded snapshot', () => {
|
|
28
|
+
it('renders', () => {
|
|
29
|
+
const w = wrapper();
|
|
30
|
+
w.find(Link).simulate('click');
|
|
31
|
+
expect(w).toMatchSnapshot();
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe('exclude zeros', () => {
|
|
36
|
+
it('renders correctly with excluded zeroes', () => {
|
|
37
|
+
let w = wrapper({
|
|
38
|
+
excludeZero: true,
|
|
39
|
+
points: ['a teeny bit right', 'mostly right', 'bingo'],
|
|
40
|
+
sampleAnswers: ['just right', 'not left', null]
|
|
41
|
+
});
|
|
42
|
+
w.find(Link).simulate('click');
|
|
43
|
+
expect(w.find('li').length).toEqual(5);
|
|
44
|
+
|
|
45
|
+
w = wrapper({excludeZero: false});
|
|
46
|
+
w.find(Link).simulate('click');
|
|
47
|
+
expect(w.find('li').length).toEqual(6);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Rubric from './main';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import ReactDOM from 'react-dom';
|
|
4
|
+
import debug from 'debug';
|
|
5
|
+
|
|
6
|
+
export default class RubricRender extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
debug.log('constructor called');
|
|
10
|
+
this.onModelChanged = this.onModelChanged.bind(this);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
set model(s) {
|
|
14
|
+
this._model = s;
|
|
15
|
+
this._render();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
onModelChanged(m) {
|
|
19
|
+
this._model = m;
|
|
20
|
+
this._render();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
this._render();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_render() {
|
|
28
|
+
if (this._model) {
|
|
29
|
+
const el = <Rubric value={this._model} />;
|
|
30
|
+
|
|
31
|
+
ReactDOM.render(el, this);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
3
|
+
import ListItem from '@material-ui/core/ListItem';
|
|
4
|
+
import List from '@material-ui/core/List';
|
|
5
|
+
import ListItemText from '@material-ui/core/ListItemText';
|
|
6
|
+
import Link from '@material-ui/core/Link';
|
|
7
|
+
import Collapse from '@material-ui/core/Collapse';
|
|
8
|
+
import { color } from '@pie-lib/pie-toolbox/render-ui';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
|
|
11
|
+
export const RubricType = PropTypes.shape({
|
|
12
|
+
excludeZero: PropTypes.bool,
|
|
13
|
+
points: PropTypes.arrayOf(PropTypes.string),
|
|
14
|
+
sampleAnswers: PropTypes.arrayOf(PropTypes.string),
|
|
15
|
+
animationsDisabled: PropTypes.bool,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
class Rubric extends React.Component {
|
|
19
|
+
dudUrl = 'javascript:;';
|
|
20
|
+
|
|
21
|
+
constructor(props) {
|
|
22
|
+
super(props);
|
|
23
|
+
this.state = {
|
|
24
|
+
rubricOpen: false,
|
|
25
|
+
linkPrefix: 'Show',
|
|
26
|
+
};
|
|
27
|
+
this.toggleRubric = this.toggleRubric.bind(this);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static propTypes = {
|
|
31
|
+
classes: PropTypes.object.isRequired,
|
|
32
|
+
animationsDisabled: PropTypes.bool,
|
|
33
|
+
value: RubricType,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
toggleRubric() {
|
|
37
|
+
this.setState({ rubricOpen: !this.state.rubricOpen });
|
|
38
|
+
this.setState({ linkPrefix: this.state.rubricOpen ? 'Show' : 'Hide' });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
shouldRenderPoint = (index, value) => {
|
|
42
|
+
if (!value.excludeZero) {
|
|
43
|
+
return true;
|
|
44
|
+
} else {
|
|
45
|
+
return index !== 0;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
render() {
|
|
50
|
+
const { value, classes } = this.props;
|
|
51
|
+
let { animationsDisabled } = this.props;
|
|
52
|
+
animationsDisabled = animationsDisabled || value.animationsDisabled;
|
|
53
|
+
|
|
54
|
+
if (value && value.points) {
|
|
55
|
+
const { points, sampleAnswers } = value;
|
|
56
|
+
|
|
57
|
+
const rubricList = (
|
|
58
|
+
<List component="nav">
|
|
59
|
+
{points
|
|
60
|
+
.slice(0)
|
|
61
|
+
.reverse()
|
|
62
|
+
.map((desc, index) => {
|
|
63
|
+
index = points.length - index - 1;
|
|
64
|
+
const pointsLabel = value.excludeZero ? index + 1: index;
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<React.Fragment key={index}>
|
|
68
|
+
<ListItem key={`P${index}`}>
|
|
69
|
+
<ListItemText
|
|
70
|
+
className={classes.rubricCol}
|
|
71
|
+
primary={<div className={classes.text}>{pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`}</div>}
|
|
72
|
+
/>
|
|
73
|
+
|
|
74
|
+
<ListItemText
|
|
75
|
+
primary={<div className={classes.text} dangerouslySetInnerHTML={{ __html: desc }} />}
|
|
76
|
+
/>
|
|
77
|
+
</ListItem>
|
|
78
|
+
|
|
79
|
+
{sampleAnswers && sampleAnswers[index] && (
|
|
80
|
+
<ListItem key={`S${index}`}>
|
|
81
|
+
<ListItemText
|
|
82
|
+
className={classes.rubricCol}
|
|
83
|
+
style={{ marginLeft: '20px' }}
|
|
84
|
+
primary={<div className={classes.text}>Sample Answer</div>}
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
<ListItemText
|
|
88
|
+
primary={
|
|
89
|
+
<div className={classes.text} dangerouslySetInnerHTML={{ __html: sampleAnswers[index] }} />
|
|
90
|
+
}
|
|
91
|
+
/>
|
|
92
|
+
</ListItem>
|
|
93
|
+
)}
|
|
94
|
+
</React.Fragment>
|
|
95
|
+
);
|
|
96
|
+
})}
|
|
97
|
+
</List>
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<div className={classes.root}>
|
|
102
|
+
{!animationsDisabled ? (
|
|
103
|
+
<React.Fragment>
|
|
104
|
+
<Link href={this.dudUrl} onClick={this.toggleRubric}>
|
|
105
|
+
{this.state.linkPrefix} Rubric
|
|
106
|
+
</Link>
|
|
107
|
+
<Collapse in={this.state.rubricOpen} timeout="auto">
|
|
108
|
+
{rubricList}
|
|
109
|
+
</Collapse>
|
|
110
|
+
</React.Fragment>
|
|
111
|
+
) : (
|
|
112
|
+
rubricList
|
|
113
|
+
)}
|
|
114
|
+
</div>
|
|
115
|
+
);
|
|
116
|
+
} else {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const styles = () => ({
|
|
123
|
+
root: {
|
|
124
|
+
color: color.text(),
|
|
125
|
+
backgroundColor: color.background(),
|
|
126
|
+
},
|
|
127
|
+
rubricCol: {
|
|
128
|
+
flex: '0 1 auto',
|
|
129
|
+
minWidth: 'fit-content',
|
|
130
|
+
},
|
|
131
|
+
text: {
|
|
132
|
+
color: color.text(),
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
export default withStyles(styles)(Rubric);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import debounce from 'lodash/debounce';
|
|
4
|
+
import Main from './main';
|
|
5
|
+
import { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';
|
|
6
|
+
import debug from 'debug';
|
|
7
|
+
|
|
8
|
+
const log = debug('pie-element:rubric:print');
|
|
9
|
+
|
|
10
|
+
const preparePrintModel = (model, opts) => {
|
|
11
|
+
const instr = opts.role === 'instructor';
|
|
12
|
+
|
|
13
|
+
if (!instr) {
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
model.value = { ...model };
|
|
18
|
+
model.mode = 'evaluate';
|
|
19
|
+
model.animationsDisabled = true;
|
|
20
|
+
|
|
21
|
+
return model;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default class RubricPrint extends HTMLElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
this._options = null;
|
|
28
|
+
this._model = null;
|
|
29
|
+
this._session = [];
|
|
30
|
+
this._rerender = debounce(
|
|
31
|
+
() => {
|
|
32
|
+
if (this._model && this._session) {
|
|
33
|
+
const printModel = preparePrintModel(this._model, this._options);
|
|
34
|
+
|
|
35
|
+
const element =
|
|
36
|
+
this._options &&
|
|
37
|
+
React.createElement(Main, {
|
|
38
|
+
...printModel,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
ReactDOM.render(element, this, () => {
|
|
42
|
+
log('render complete - render math');
|
|
43
|
+
renderMath(this);
|
|
44
|
+
});
|
|
45
|
+
} else {
|
|
46
|
+
log('skip');
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
50,
|
|
50
|
+
{ leading: false, trailing: true },
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
set options(o) {
|
|
54
|
+
this._options = o;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
set model(s) {
|
|
58
|
+
this._model = s;
|
|
59
|
+
this._rerender();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
connectedCallback() {}
|
|
63
|
+
}
|
package/configure/package.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"author": "Pie Framework Authors",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@material-ui/core": "^3.9.2",
|
|
11
|
-
"@pie-element/multi-trait-rubric": "
|
|
12
|
-
"@pie-element/rubric": "
|
|
11
|
+
"@pie-element/multi-trait-rubric": "3.10.1-next.10",
|
|
12
|
+
"@pie-element/rubric": "3.10.1-next.10",
|
|
13
13
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
14
14
|
"@pie-lib/config-ui": "^11.9.25-next.0",
|
|
15
15
|
"@pie-lib/editable-html": "^11.1.2-next.0",
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var multiTraitDefaultModel = {
|
|
8
|
+
visibleToStudent: true,
|
|
9
|
+
halfScoring: false,
|
|
10
|
+
pointLabels: true,
|
|
11
|
+
description: false,
|
|
12
|
+
standards: false,
|
|
13
|
+
scales: [],
|
|
14
|
+
excludeZero: false
|
|
15
|
+
};
|
|
16
|
+
var rubricDefaultModel = {
|
|
17
|
+
points: ['', '', '', ''],
|
|
18
|
+
sampleAnswers: [null, null, null, null],
|
|
19
|
+
maxPoints: 4,
|
|
20
|
+
excludeZero: false
|
|
21
|
+
};
|
|
22
|
+
var rubriclessDefaultModel = {
|
|
23
|
+
maxPoints: 100,
|
|
24
|
+
excludeZero: false,
|
|
25
|
+
rubriclessInstructionEnabled: true
|
|
26
|
+
};
|
|
27
|
+
var multiTraitDefaultConfiguration = {
|
|
28
|
+
settingsPanelDisabled: false,
|
|
29
|
+
excludeZeroDialogBoxContent: {
|
|
30
|
+
title: 'Exclude 0 (Zero) from Score Point Values.',
|
|
31
|
+
text: "<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>"
|
|
32
|
+
},
|
|
33
|
+
includeZeroDialogBoxContent: {
|
|
34
|
+
title: 'Include 0 (Zero) in Score Point Values.',
|
|
35
|
+
text: "<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>"
|
|
36
|
+
},
|
|
37
|
+
deleteScaleDialogBoxContent: {
|
|
38
|
+
title: 'Delete Scale',
|
|
39
|
+
text: 'Are you sure you want to delete this scale?'
|
|
40
|
+
},
|
|
41
|
+
maxPointsDialogBoxContent: {
|
|
42
|
+
title: 'Decreasing Max Points.',
|
|
43
|
+
text: " You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted."
|
|
44
|
+
},
|
|
45
|
+
spellCheck: {
|
|
46
|
+
label: 'Spellcheck',
|
|
47
|
+
settings: false,
|
|
48
|
+
enabled: true
|
|
49
|
+
},
|
|
50
|
+
showExcludeZero: {
|
|
51
|
+
settings: true,
|
|
52
|
+
label: 'Exclude Zero'
|
|
53
|
+
},
|
|
54
|
+
showScorePointLabels: {
|
|
55
|
+
settings: true,
|
|
56
|
+
label: 'Show Score Point Labels'
|
|
57
|
+
},
|
|
58
|
+
showDescription: {
|
|
59
|
+
settings: true,
|
|
60
|
+
label: 'Show Description'
|
|
61
|
+
},
|
|
62
|
+
showVisibleToStudent: {
|
|
63
|
+
settings: true,
|
|
64
|
+
label: 'Visible to Student'
|
|
65
|
+
},
|
|
66
|
+
showHalfScoring: {
|
|
67
|
+
settings: true,
|
|
68
|
+
label: 'Half Scoring'
|
|
69
|
+
},
|
|
70
|
+
width: '900px',
|
|
71
|
+
// these should not be set to true (should not be used) for now
|
|
72
|
+
showStandards: {
|
|
73
|
+
settings: false,
|
|
74
|
+
label: 'Show Standards'
|
|
75
|
+
},
|
|
76
|
+
showLevelTagInput: {
|
|
77
|
+
settings: false,
|
|
78
|
+
label: 'Show Level Tag Input',
|
|
79
|
+
enabled: false
|
|
80
|
+
},
|
|
81
|
+
dragAndDrop: {
|
|
82
|
+
settings: true,
|
|
83
|
+
label: 'Enable Drag and Drop',
|
|
84
|
+
enabled: false
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
var rubricDefaultConfiguration = {
|
|
88
|
+
showExcludeZero: {
|
|
89
|
+
settings: true,
|
|
90
|
+
label: 'Ability to exclude zero'
|
|
91
|
+
},
|
|
92
|
+
showMaxPoint: {
|
|
93
|
+
settings: true,
|
|
94
|
+
label: 'Show max points dropdown'
|
|
95
|
+
},
|
|
96
|
+
settingsPanelDisabled: false
|
|
97
|
+
};
|
|
98
|
+
var rubriclessDefaultConfiguration = {
|
|
99
|
+
showExcludeZero: {
|
|
100
|
+
settings: true,
|
|
101
|
+
label: 'Ability to exclude zero'
|
|
102
|
+
},
|
|
103
|
+
showMaxPoint: {
|
|
104
|
+
settings: true,
|
|
105
|
+
label: 'Show max points dropdown'
|
|
106
|
+
},
|
|
107
|
+
settingsPanelDisabled: false,
|
|
108
|
+
// shows us if it simple rubric or rubricless(simple rubric with less structure)
|
|
109
|
+
rubricless: true,
|
|
110
|
+
// scoring instruction for rubricless
|
|
111
|
+
rubriclessInstruction: {
|
|
112
|
+
settings: true,
|
|
113
|
+
label: 'Instruction'
|
|
114
|
+
},
|
|
115
|
+
maxMaxPoints: 100
|
|
116
|
+
};
|
|
117
|
+
var _default = {
|
|
118
|
+
model: {
|
|
119
|
+
rubricOptions: ['simpleRubric', 'multiTraitRubric'],
|
|
120
|
+
rubricType: 'simpleRubric',
|
|
121
|
+
rubrics: {
|
|
122
|
+
simpleRubric: rubricDefaultModel,
|
|
123
|
+
multiTraitRubric: multiTraitDefaultModel,
|
|
124
|
+
rubricless: rubriclessDefaultModel
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
configuration: {
|
|
128
|
+
multiTraitRubric: multiTraitDefaultConfiguration,
|
|
129
|
+
simpleRubric: rubricDefaultConfiguration,
|
|
130
|
+
rubricless: rubriclessDefaultConfiguration
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
exports["default"] = _default;
|
|
134
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["multiTraitDefaultModel","visibleToStudent","halfScoring","pointLabels","description","standards","scales","excludeZero","rubricDefaultModel","points","sampleAnswers","maxPoints","rubriclessDefaultModel","rubriclessInstructionEnabled","multiTraitDefaultConfiguration","settingsPanelDisabled","excludeZeroDialogBoxContent","title","text","includeZeroDialogBoxContent","deleteScaleDialogBoxContent","maxPointsDialogBoxContent","spellCheck","label","settings","enabled","showExcludeZero","showScorePointLabels","showDescription","showVisibleToStudent","showHalfScoring","width","showStandards","showLevelTagInput","dragAndDrop","rubricDefaultConfiguration","showMaxPoint","rubriclessDefaultConfiguration","rubricless","rubriclessInstruction","maxMaxPoints","model","rubricOptions","rubricType","rubrics","simpleRubric","multiTraitRubric","configuration"],"mappings":";;;;;;AAAA,IAAMA,sBAAsB,GAAG;AAC7BC,EAAAA,gBAAgB,EAAE,IADW;AAE7BC,EAAAA,WAAW,EAAE,KAFgB;AAG7BC,EAAAA,WAAW,EAAE,IAHgB;AAI7BC,EAAAA,WAAW,EAAE,KAJgB;AAK7BC,EAAAA,SAAS,EAAE,KALkB;AAM7BC,EAAAA,MAAM,EAAE,EANqB;AAO7BC,EAAAA,WAAW,EAAE;AAPgB,CAA/B;AAUA,IAAMC,kBAAkB,GAAG;AACzBC,EAAAA,MAAM,EAAE,CAAC,EAAD,EAAK,EAAL,EAAS,EAAT,EAAa,EAAb,CADiB;AAEzBC,EAAAA,aAAa,EAAE,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,CAFU;AAGzBC,EAAAA,SAAS,EAAE,CAHc;AAIzBJ,EAAAA,WAAW,EAAE;AAJY,CAA3B;AAOA,IAAMK,sBAAsB,GAAG;AAC7BD,EAAAA,SAAS,EAAE,GADkB;AAE7BJ,EAAAA,WAAW,EAAE,KAFgB;AAG7BM,EAAAA,4BAA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AAhB;AAAoCsC,MAAAA,gBAAgB,EAAE9C,sBAAtD;AAA8EsC,MAAAA,UAAU,EAAE1B;AAA1F;AAHJ,GADM;AAMbmC,EAAAA,aAAa,EAAE;AACbD,IAAAA,gBAAgB,EAAEhC,8BADL;AAEb+B,IAAAA,YAAY,EAAEV,0BAFD;AAGbG,IAAAA,UAAU,EAAED;AAHC;AANF,C","sourcesContent":["const multiTraitDefaultModel = {\n visibleToStudent: true,\n halfScoring: false,\n pointLabels: true,\n description: false,\n standards: false,\n scales: [],\n excludeZero: false,\n};\n\nconst rubricDefaultModel = {\n points: ['', '', '', ''],\n sampleAnswers: [null, null, null, null],\n maxPoints: 4,\n excludeZero: false,\n};\n\nconst rubriclessDefaultModel = {\n maxPoints: 100,\n excludeZero: false,\n rubriclessInstructionEnabled: true,\n};\n\nconst multiTraitDefaultConfiguration = {\n settingsPanelDisabled: false,\n excludeZeroDialogBoxContent: {\n title: 'Exclude 0 (Zero) from Score Point Values.',\n text: `<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>`,\n },\n includeZeroDialogBoxContent: {\n title: 'Include 0 (Zero) in Score Point Values.',\n text: `<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>`,\n },\n deleteScaleDialogBoxContent: {\n title: 'Delete Scale',\n text: 'Are you sure you want to delete this scale?',\n },\n maxPointsDialogBoxContent: {\n title: 'Decreasing Max Points.',\n text: ` You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted.`,\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n showExcludeZero: {\n settings: true,\n label: 'Exclude Zero',\n },\n showScorePointLabels: {\n settings: true,\n label: 'Show Score Point Labels',\n },\n showDescription: {\n settings: true,\n label: 'Show Description',\n },\n showVisibleToStudent: {\n settings: true,\n label: 'Visible to Student',\n },\n showHalfScoring: {\n settings: true,\n label: 'Half Scoring',\n },\n width: '900px',\n // these should not be set to true (should not be used) for now\n showStandards: {\n settings: false,\n label: 'Show Standards',\n },\n showLevelTagInput: {\n settings: false,\n label: 'Show Level Tag Input',\n enabled: false,\n },\n dragAndDrop: {\n settings: true,\n label: 'Enable Drag and Drop',\n enabled: false,\n },\n};\n\nconst rubricDefaultConfiguration = {\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};\n\nconst rubriclessDefaultConfiguration = {\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 // shows us if it simple rubric or rubricless(simple rubric with less structure)\n rubricless: true,\n // scoring instruction for rubricless\n rubriclessInstruction: {\n settings: true,\n label: 'Instruction',\n },\n maxMaxPoints: 100,\n};\n\nexport default {\n model: {\n rubricOptions: ['simpleRubric', 'multiTraitRubric'],\n rubricType: 'simpleRubric',\n rubrics: { simpleRubric: rubricDefaultModel, multiTraitRubric: multiTraitDefaultModel, rubricless: rubriclessDefaultModel },\n },\n configuration: {\n multiTraitRubric: multiTraitDefaultConfiguration,\n simpleRubric: rubricDefaultConfiguration,\n rubricless: rubriclessDefaultConfiguration,\n },\n};\n"],"file":"defaults.js"}
|