@pie-element/complex-rubric 2.1.2-next.44 → 2.1.2-next.57
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 +4 -2
- package/configure/lib/defaults.js.map +1 -1
- package/configure/package.json +2 -2
- package/configure/src/defaults.js +2 -0
- package/controller/package.json +1 -1
- package/docs/config-schema.json +20 -0
- package/docs/config-schema.json.md +16 -0
- package/docs/pie-schema.json +10 -0
- package/docs/pie-schema.json.md +8 -0
- package/package.json +4 -4
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +0 -1001
- package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +0 -55
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +0 -892
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +0 -563
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +0 -99
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +0 -126
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +0 -569
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +0 -361
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +0 -560
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +0 -374
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +0 -283
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +0 -29
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +0 -18
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +0 -233
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +0 -94
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +0 -215
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js +0 -13
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +0 -15
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +0 -272
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +0 -206
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +0 -180
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +0 -6
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +0 -298
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +0 -201
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +0 -85
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +0 -161
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +0 -330
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +0 -103
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +0 -24
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +0 -257
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +0 -1271
- package/configure/node_modules/@pie-element/rubric/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/rubric/README.md +0 -3
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +0 -197
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +0 -1111
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +0 -34
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +0 -130
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +0 -108
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/package.json +0 -17
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +0 -26
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +0 -64
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +0 -56
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +0 -17
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +0 -215
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +0 -45
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/controller/package.json +0 -13
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +0 -31
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +0 -38
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +0 -160
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +0 -127
- package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +0 -8
- package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +0 -2
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +0 -96
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +0 -65
- package/configure/node_modules/@pie-element/rubric/lib/index.js +0 -88
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/main.js +0 -188
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/print.js +0 -114
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/package.json +0 -26
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +0 -23003
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +0 -46
- package/configure/node_modules/@pie-element/rubric/src/index.js +0 -34
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +0 -136
- package/configure/node_modules/@pie-element/rubric/src/print.js +0 -63
package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js
DELETED
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.TraitsHeaderTile = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
-
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
22
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
|
-
var _styles = require("@material-ui/core/styles");
|
|
29
|
-
|
|
30
|
-
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
31
|
-
|
|
32
|
-
var _Menu = _interopRequireDefault(require("@material-ui/core/Menu"));
|
|
33
|
-
|
|
34
|
-
var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
|
|
35
|
-
|
|
36
|
-
var _MoreVert = _interopRequireDefault(require("@material-ui/icons/MoreVert"));
|
|
37
|
-
|
|
38
|
-
var _renderUi = require("@pie-lib/pie-toolbox/render-ui");
|
|
39
|
-
|
|
40
|
-
var _common = require("./common");
|
|
41
|
-
|
|
42
|
-
var _utils = require("./utils");
|
|
43
|
-
|
|
44
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
45
|
-
|
|
46
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
47
|
-
|
|
48
|
-
var styles = function styles(theme) {
|
|
49
|
-
return {
|
|
50
|
-
label: {
|
|
51
|
-
textAlign: 'center',
|
|
52
|
-
width: '140px',
|
|
53
|
-
border: 'none',
|
|
54
|
-
margin: theme.spacing.unit,
|
|
55
|
-
padding: '10px 0',
|
|
56
|
-
display: 'flex',
|
|
57
|
-
alignItems: 'center',
|
|
58
|
-
justifyContent: 'space-around'
|
|
59
|
-
},
|
|
60
|
-
greyHeader: {
|
|
61
|
-
background: _renderUi.color.secondaryBackground(),
|
|
62
|
-
borderRadius: '4px',
|
|
63
|
-
position: 'relative',
|
|
64
|
-
marginBottom: theme.spacing.unit * 2
|
|
65
|
-
},
|
|
66
|
-
primaryBlockGreyHeader: {
|
|
67
|
-
paddingTop: theme.spacing.unit * 1.5
|
|
68
|
-
},
|
|
69
|
-
errorText: {
|
|
70
|
-
fontSize: theme.typography.fontSize - 2,
|
|
71
|
-
color: theme.palette.error.main,
|
|
72
|
-
paddingTop: theme.spacing.unit / 2
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
var TraitsHeaderTile = /*#__PURE__*/function (_React$Component) {
|
|
78
|
-
(0, _inherits2["default"])(TraitsHeaderTile, _React$Component);
|
|
79
|
-
|
|
80
|
-
var _super = _createSuper(TraitsHeaderTile);
|
|
81
|
-
|
|
82
|
-
function TraitsHeaderTile() {
|
|
83
|
-
var _this;
|
|
84
|
-
|
|
85
|
-
(0, _classCallCheck2["default"])(this, TraitsHeaderTile);
|
|
86
|
-
|
|
87
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
88
|
-
args[_key] = arguments[_key];
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
92
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
|
|
93
|
-
anchorEl: null
|
|
94
|
-
});
|
|
95
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onScorePointLabelChange", function (_ref) {
|
|
96
|
-
var scorePointLabel = _ref.scorePointLabel,
|
|
97
|
-
value = _ref.value;
|
|
98
|
-
var _this$props = _this.props,
|
|
99
|
-
scorePointsLabels = _this$props.scorePointsLabels,
|
|
100
|
-
onScaleChange = _this$props.onScaleChange;
|
|
101
|
-
if (value < 0 || value >= scorePointsLabels.length) return;
|
|
102
|
-
scorePointsLabels[value] = scorePointLabel;
|
|
103
|
-
onScaleChange({
|
|
104
|
-
scorePointsLabels: scorePointsLabels
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleClick", function (event) {
|
|
108
|
-
return _this.setState({
|
|
109
|
-
anchorEl: event.currentTarget
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleClose", function () {
|
|
113
|
-
return _this.setState({
|
|
114
|
-
anchorEl: null
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "scrollToPosition", function (position) {
|
|
118
|
-
return _this.secondaryBlock.scrollTo({
|
|
119
|
-
left: position
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "openMenu", function () {
|
|
123
|
-
_this.props.showDeleteScaleModal();
|
|
124
|
-
|
|
125
|
-
_this.handleClose();
|
|
126
|
-
});
|
|
127
|
-
return _this;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
(0, _createClass2["default"])(TraitsHeaderTile, [{
|
|
131
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
132
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
133
|
-
if (nextProps.currentPosition !== this.props.currentPosition) {
|
|
134
|
-
this.scrollToPosition(nextProps.currentPosition);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}, {
|
|
138
|
-
key: "render",
|
|
139
|
-
value: function render() {
|
|
140
|
-
var _this2 = this;
|
|
141
|
-
|
|
142
|
-
var _this$props2 = this.props,
|
|
143
|
-
scorePointsValues = _this$props2.scorePointsValues,
|
|
144
|
-
scorePointsLabels = _this$props2.scorePointsLabels,
|
|
145
|
-
traitLabel = _this$props2.traitLabel,
|
|
146
|
-
classes = _this$props2.classes,
|
|
147
|
-
currentPosition = _this$props2.currentPosition,
|
|
148
|
-
showStandards = _this$props2.showStandards,
|
|
149
|
-
onTraitLabelChange = _this$props2.onTraitLabelChange,
|
|
150
|
-
showDescription = _this$props2.showDescription,
|
|
151
|
-
showLevelTagInput = _this$props2.showLevelTagInput,
|
|
152
|
-
maxPoints = _this$props2.maxPoints,
|
|
153
|
-
updateMaxPointsFieldValue = _this$props2.updateMaxPointsFieldValue,
|
|
154
|
-
scaleIndex = _this$props2.scaleIndex,
|
|
155
|
-
showScorePointLabels = _this$props2.showScorePointLabels,
|
|
156
|
-
secondaryBlockWidth = _this$props2.secondaryBlockWidth,
|
|
157
|
-
setSecondaryBlockRef = _this$props2.setSecondaryBlockRef,
|
|
158
|
-
spellCheck = _this$props2.spellCheck,
|
|
159
|
-
uploadSoundSupport = _this$props2.uploadSoundSupport,
|
|
160
|
-
maxPointsEnabled = _this$props2.maxPointsEnabled,
|
|
161
|
-
_this$props2$mathMlOp = _this$props2.mathMlOptions,
|
|
162
|
-
mathMlOptions = _this$props2$mathMlOp === void 0 ? {} : _this$props2$mathMlOp,
|
|
163
|
-
_this$props2$errors = _this$props2.errors,
|
|
164
|
-
errors = _this$props2$errors === void 0 ? {} : _this$props2$errors;
|
|
165
|
-
var anchorEl = this.state.anchorEl;
|
|
166
|
-
return /*#__PURE__*/_react["default"].createElement(_common.Row, {
|
|
167
|
-
className: classes.greyHeader,
|
|
168
|
-
height: showLevelTagInput ? _common.HeaderHeightLarge : _common.HeaderHeight
|
|
169
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.PrimaryBlock, {
|
|
170
|
-
className: classes.primaryBlockGreyHeader
|
|
171
|
-
}, showLevelTagInput && /*#__PURE__*/_react["default"].createElement(_common.SimpleInput, {
|
|
172
|
-
markup: traitLabel || 'Trait',
|
|
173
|
-
onChange: onTraitLabelChange,
|
|
174
|
-
pluginProps: _utils.labelPlugins,
|
|
175
|
-
spellCheck: spellCheck,
|
|
176
|
-
label: "Level Label",
|
|
177
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
178
|
-
mathMlOptions: mathMlOptions
|
|
179
|
-
}), /*#__PURE__*/_react["default"].createElement(_common.ScaleSettings, null, /*#__PURE__*/_react["default"].createElement("div", null, "Scale ", scaleIndex + 1), maxPointsEnabled && /*#__PURE__*/_react["default"].createElement(_common.MaxPointsPicker, {
|
|
180
|
-
maxPoints: maxPoints,
|
|
181
|
-
onChange: updateMaxPointsFieldValue
|
|
182
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
183
|
-
"aria-label": "more",
|
|
184
|
-
"aria-controls": "long-menu",
|
|
185
|
-
"aria-haspopup": "true",
|
|
186
|
-
onClick: this.handleClick
|
|
187
|
-
}, /*#__PURE__*/_react["default"].createElement(_MoreVert["default"], null)), /*#__PURE__*/_react["default"].createElement(_Menu["default"], {
|
|
188
|
-
id: "long-menu",
|
|
189
|
-
anchorEl: anchorEl,
|
|
190
|
-
keepMounted: true,
|
|
191
|
-
open: !!anchorEl,
|
|
192
|
-
onClose: this.handleClose
|
|
193
|
-
}, ['Remove Scale'].map(function (option) {
|
|
194
|
-
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
195
|
-
key: option,
|
|
196
|
-
onClick: _this2.openMenu
|
|
197
|
-
}, option);
|
|
198
|
-
}))))), /*#__PURE__*/_react["default"].createElement(_common.SecondaryBlock, {
|
|
199
|
-
setRef: function setRef(ref) {
|
|
200
|
-
if (ref) {
|
|
201
|
-
_this2.secondaryBlock = ref;
|
|
202
|
-
setSecondaryBlockRef(ref);
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
width: "".concat(secondaryBlockWidth, "px")
|
|
206
|
-
}, showStandards && /*#__PURE__*/_react["default"].createElement(_common.Block, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
207
|
-
className: classes.label
|
|
208
|
-
}, "Standard(s)")), showDescription && /*#__PURE__*/_react["default"].createElement(_common.Block, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
209
|
-
className: classes.label
|
|
210
|
-
}, "Description")), scorePointsValues.map(function (scorePointsValue, index) {
|
|
211
|
-
var adjustedBlockWidth = _common.BlockWidth + 2 * 8; // 8 is padding
|
|
212
|
-
|
|
213
|
-
var remainingSpace = secondaryBlockWidth - adjustedBlockWidth * index + currentPosition - 128;
|
|
214
|
-
var value = scorePointsValues.length - index - 1;
|
|
215
|
-
var scoreDescriptor;
|
|
216
|
-
var error;
|
|
217
|
-
|
|
218
|
-
try {
|
|
219
|
-
scoreDescriptor = scorePointsLabels[value] || '';
|
|
220
|
-
error = errors[value] || '';
|
|
221
|
-
} catch (e) {
|
|
222
|
-
scoreDescriptor = '';
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
return /*#__PURE__*/_react["default"].createElement(_common.Block, {
|
|
226
|
-
key: "secondary-block-part-".concat(index)
|
|
227
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.ScorePoint, {
|
|
228
|
-
scorePointsValue: scorePointsValue,
|
|
229
|
-
error: error,
|
|
230
|
-
scoreDescriptor: scoreDescriptor,
|
|
231
|
-
pluginProps: _utils.labelPlugins,
|
|
232
|
-
showScorePointLabels: showScorePointLabels,
|
|
233
|
-
onChange: function onChange(scorePointLabel) {
|
|
234
|
-
return _this2.onScorePointLabelChange({
|
|
235
|
-
scorePointLabel: scorePointLabel,
|
|
236
|
-
value: value
|
|
237
|
-
});
|
|
238
|
-
},
|
|
239
|
-
alignToRight: remainingSpace < 296 && scorePointsValue < maxPoints // 296 is the space required for the toolbar
|
|
240
|
-
,
|
|
241
|
-
spellCheck: spellCheck,
|
|
242
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
243
|
-
mathMlOptions: mathMlOptions
|
|
244
|
-
}), error && /*#__PURE__*/_react["default"].createElement("div", {
|
|
245
|
-
className: classes.errorText
|
|
246
|
-
}, error));
|
|
247
|
-
})));
|
|
248
|
-
}
|
|
249
|
-
}]);
|
|
250
|
-
return TraitsHeaderTile;
|
|
251
|
-
}(_react["default"].Component);
|
|
252
|
-
|
|
253
|
-
exports.TraitsHeaderTile = TraitsHeaderTile;
|
|
254
|
-
(0, _defineProperty2["default"])(TraitsHeaderTile, "propTypes", {
|
|
255
|
-
maxPointsEnabled: _propTypes["default"].bool,
|
|
256
|
-
spellCheck: _propTypes["default"].bool,
|
|
257
|
-
errors: _propTypes["default"].object
|
|
258
|
-
});
|
|
259
|
-
TraitsHeaderTile.propTypes = {
|
|
260
|
-
classes: _propTypes["default"].object.isRequired,
|
|
261
|
-
onTraitLabelChange: _propTypes["default"].func,
|
|
262
|
-
onScaleChange: _propTypes["default"].func,
|
|
263
|
-
scorePointsValues: _propTypes["default"].arrayOf(_propTypes["default"].number),
|
|
264
|
-
scorePointsLabels: _propTypes["default"].arrayOf(_propTypes["default"].string),
|
|
265
|
-
traitLabel: _propTypes["default"].string,
|
|
266
|
-
showStandards: _propTypes["default"].bool,
|
|
267
|
-
showLevelTagInput: _propTypes["default"].bool,
|
|
268
|
-
showDescription: _propTypes["default"].bool,
|
|
269
|
-
maxPoints: _propTypes["default"].number,
|
|
270
|
-
updateMaxPointsFieldValue: _propTypes["default"].func,
|
|
271
|
-
scaleIndex: _propTypes["default"].number,
|
|
272
|
-
currentPosition: _propTypes["default"].number,
|
|
273
|
-
secondaryBlockWidth: _propTypes["default"].number,
|
|
274
|
-
showDeleteScaleModal: _propTypes["default"].func,
|
|
275
|
-
showScorePointLabels: _propTypes["default"].bool,
|
|
276
|
-
setSecondaryBlockRef: _propTypes["default"].func,
|
|
277
|
-
uploadSoundSupport: _propTypes["default"].object
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
var _default = (0, _styles.withStyles)(styles)(TraitsHeaderTile);
|
|
281
|
-
|
|
282
|
-
exports["default"] = _default;
|
|
283
|
-
//# sourceMappingURL=traitsHeader.js.map
|
package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/traitsHeader.jsx"],"names":["styles","theme","label","textAlign","width","border","margin","spacing","unit","padding","display","alignItems","justifyContent","greyHeader","background","color","secondaryBackground","borderRadius","position","marginBottom","primaryBlockGreyHeader","paddingTop","errorText","fontSize","typography","palette","error","main","TraitsHeaderTile","anchorEl","scorePointLabel","value","props","scorePointsLabels","onScaleChange","length","event","setState","currentTarget","secondaryBlock","scrollTo","left","showDeleteScaleModal","handleClose","nextProps","currentPosition","scrollToPosition","scorePointsValues","traitLabel","classes","showStandards","onTraitLabelChange","showDescription","showLevelTagInput","maxPoints","updateMaxPointsFieldValue","scaleIndex","showScorePointLabels","secondaryBlockWidth","setSecondaryBlockRef","spellCheck","uploadSoundSupport","maxPointsEnabled","mathMlOptions","errors","state","HeaderHeightLarge","HeaderHeight","labelPlugins","handleClick","map","option","openMenu","ref","scorePointsValue","index","adjustedBlockWidth","BlockWidth","remainingSpace","scoreDescriptor","e","onScorePointLabelChange","React","Component","PropTypes","bool","object","propTypes","isRequired","func","arrayOf","number","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AAaA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,KAAK,EAAE;AACLC,MAAAA,SAAS,EAAE,QADN;AAELC,MAAAA,KAAK,EAAE,OAFF;AAGLC,MAAAA,MAAM,EAAE,MAHH;AAILC,MAAAA,MAAM,EAAEL,KAAK,CAACM,OAAN,CAAcC,IAJjB;AAKLC,MAAAA,OAAO,EAAE,QALJ;AAMLC,MAAAA,OAAO,EAAE,MANJ;AAOLC,MAAAA,UAAU,EAAE,QAPP;AAQLC,MAAAA,cAAc,EAAE;AARX,KADkB;AAWzBC,IAAAA,UAAU,EAAE;AACVC,MAAAA,UAAU,EAAEC,gBAAMC,mBAAN,EADF;AAEVC,MAAAA,YAAY,EAAE,KAFJ;AAGVC,MAAAA,QAAQ,EAAE,UAHA;AAIVC,MAAAA,YAAY,EAAElB,KAAK,CAACM,OAAN,CAAcC,IAAd,GAAqB;AAJzB,KAXa;AAiBzBY,IAAAA,sBAAsB,EAAE;AACtBC,MAAAA,UAAU,EAAEpB,KAAK,CAACM,OAAN,CAAcC,IAAd,GAAqB;AADX,KAjBC;AAoBzBc,IAAAA,SAAS,EAAE;AACTC,MAAAA,QAAQ,EAAEtB,KAAK,CAACuB,UAAN,CAAiBD,QAAjB,GAA4B,CAD7B;AAETR,MAAAA,KAAK,EAAEd,KAAK,CAACwB,OAAN,CAAcC,KAAd,CAAoBC,IAFlB;AAGTN,MAAAA,UAAU,EAAEp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AWtF,MAAX,EAAmB4B,gBAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { withStyles } from '@material-ui/core/styles';\nimport IconButton from '@material-ui/core/IconButton';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport { color } from '@pie-lib/pie-toolbox/render-ui';\n\nimport {\n Block,\n BlockWidth,\n PrimaryBlock,\n Row,\n SecondaryBlock,\n ScorePoint,\n MaxPointsPicker,\n SimpleInput,\n ScaleSettings,\n HeaderHeight,\n HeaderHeightLarge,\n} from './common';\nimport { labelPlugins } from './utils';\n\nconst styles = (theme) => ({\n label: {\n textAlign: 'center',\n width: '140px',\n border: 'none',\n margin: theme.spacing.unit,\n padding: '10px 0',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-around',\n },\n greyHeader: {\n background: color.secondaryBackground(),\n borderRadius: '4px',\n position: 'relative',\n marginBottom: theme.spacing.unit * 2,\n },\n primaryBlockGreyHeader: {\n paddingTop: theme.spacing.unit * 1.5,\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit / 2,\n },\n});\n\nexport class TraitsHeaderTile extends React.Component {\n static propTypes = {\n maxPointsEnabled: PropTypes.bool,\n spellCheck: PropTypes.bool,\n errors: PropTypes.object,\n };\n\n state = {\n anchorEl: null,\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.currentPosition !== this.props.currentPosition) {\n this.scrollToPosition(nextProps.currentPosition);\n }\n }\n\n onScorePointLabelChange = ({ scorePointLabel, value }) => {\n const { scorePointsLabels, onScaleChange } = this.props;\n\n if (value < 0 || value >= scorePointsLabels.length) return;\n\n scorePointsLabels[value] = scorePointLabel;\n\n onScaleChange({ scorePointsLabels });\n };\n\n handleClick = (event) => this.setState({ anchorEl: event.currentTarget });\n\n handleClose = () => this.setState({ anchorEl: null });\n\n scrollToPosition = (position) => this.secondaryBlock.scrollTo({ left: position });\n\n openMenu = () => {\n this.props.showDeleteScaleModal();\n this.handleClose();\n };\n\n render() {\n const {\n scorePointsValues,\n scorePointsLabels,\n traitLabel,\n classes,\n currentPosition,\n showStandards,\n onTraitLabelChange,\n showDescription,\n showLevelTagInput,\n maxPoints,\n updateMaxPointsFieldValue,\n scaleIndex,\n showScorePointLabels,\n secondaryBlockWidth,\n setSecondaryBlockRef,\n spellCheck,\n uploadSoundSupport,\n maxPointsEnabled,\n mathMlOptions = {},\n errors = {},\n } = this.props;\n const { anchorEl } = this.state;\n\n return (\n <Row className={classes.greyHeader} height={showLevelTagInput ? HeaderHeightLarge : HeaderHeight}>\n <PrimaryBlock className={classes.primaryBlockGreyHeader}>\n {showLevelTagInput && (\n <SimpleInput\n markup={traitLabel || 'Trait'}\n onChange={onTraitLabelChange}\n pluginProps={labelPlugins}\n spellCheck={spellCheck}\n label=\"Level Label\"\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n />\n )}\n\n <ScaleSettings>\n <div>Scale {scaleIndex + 1}</div>\n\n {maxPointsEnabled && <MaxPointsPicker maxPoints={maxPoints} onChange={updateMaxPointsFieldValue} />}\n\n <div>\n <IconButton aria-label=\"more\" aria-controls=\"long-menu\" aria-haspopup=\"true\" onClick={this.handleClick}>\n <MoreVertIcon />\n </IconButton>\n <Menu id=\"long-menu\" anchorEl={anchorEl} keepMounted open={!!anchorEl} onClose={this.handleClose}>\n {['Remove Scale'].map((option) => (\n <MenuItem key={option} onClick={this.openMenu}>\n {option}\n </MenuItem>\n ))}\n </Menu>\n </div>\n </ScaleSettings>\n </PrimaryBlock>\n\n <SecondaryBlock\n setRef={(ref) => {\n if (ref) {\n this.secondaryBlock = ref;\n setSecondaryBlockRef(ref);\n }\n }}\n width={`${secondaryBlockWidth}px`}\n >\n {showStandards && (\n <Block>\n <div className={classes.label}>Standard(s)</div>\n </Block>\n )}\n\n {showDescription && (\n <Block>\n <div className={classes.label}>Description</div>\n </Block>\n )}\n\n {scorePointsValues.map((scorePointsValue, index) => {\n const adjustedBlockWidth = BlockWidth + 2 * 8; // 8 is padding\n const remainingSpace = secondaryBlockWidth - adjustedBlockWidth * index + currentPosition - 128;\n const value = scorePointsValues.length - index - 1;\n let scoreDescriptor;\n let error;\n\n try {\n scoreDescriptor = scorePointsLabels[value] || '';\n error = errors[value] || '';\n } catch (e) {\n scoreDescriptor = '';\n }\n\n\n return (\n <Block key={`secondary-block-part-${index}`}>\n <ScorePoint\n scorePointsValue={scorePointsValue}\n error={error}\n scoreDescriptor={scoreDescriptor}\n pluginProps={labelPlugins}\n showScorePointLabels={showScorePointLabels}\n onChange={(scorePointLabel) => this.onScorePointLabelChange({ scorePointLabel, value })}\n alignToRight={remainingSpace < 296 && scorePointsValue < maxPoints} // 296 is the space required for the toolbar\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n />\n {error && <div className={classes.errorText}>{error}</div>}\n </Block>\n );\n })}\n </SecondaryBlock>\n </Row>\n );\n }\n}\n\nTraitsHeaderTile.propTypes = {\n classes: PropTypes.object.isRequired,\n onTraitLabelChange: PropTypes.func,\n onScaleChange: PropTypes.func,\n scorePointsValues: PropTypes.arrayOf(PropTypes.number),\n scorePointsLabels: PropTypes.arrayOf(PropTypes.string),\n traitLabel: PropTypes.string,\n showStandards: PropTypes.bool,\n showLevelTagInput: PropTypes.bool,\n showDescription: PropTypes.bool,\n maxPoints: PropTypes.number,\n updateMaxPointsFieldValue: PropTypes.func,\n scaleIndex: PropTypes.number,\n currentPosition: PropTypes.number,\n secondaryBlockWidth: PropTypes.number,\n showDeleteScaleModal: PropTypes.func,\n showScorePointLabels: PropTypes.bool,\n setSecondaryBlockRef: PropTypes.func,\n uploadSoundSupport: PropTypes.object,\n};\n\nexport default withStyles(styles)(TraitsHeaderTile);\n"],"file":"traitsHeader.js"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.labelPlugins = exports.filteredDefaultPlugins = void 0;
|
|
7
|
-
|
|
8
|
-
var _editableHtml = require("@pie-lib/pie-toolbox/editable-html");
|
|
9
|
-
|
|
10
|
-
var filteredDefaultPlugins = (_editableHtml.DEFAULT_PLUGINS || []).filter(function (p) {
|
|
11
|
-
return p !== 'table' && p !== 'bulleted-list' && p !== 'numbered-list';
|
|
12
|
-
});
|
|
13
|
-
exports.filteredDefaultPlugins = filteredDefaultPlugins;
|
|
14
|
-
var labelPlugins = {
|
|
15
|
-
image: {
|
|
16
|
-
disabled: true
|
|
17
|
-
},
|
|
18
|
-
math: {
|
|
19
|
-
disabled: true
|
|
20
|
-
},
|
|
21
|
-
audio: {
|
|
22
|
-
disabled: true
|
|
23
|
-
},
|
|
24
|
-
video: {
|
|
25
|
-
disabled: true
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
exports.labelPlugins = labelPlugins;
|
|
29
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils.js"],"names":["filteredDefaultPlugins","DEFAULT_PLUGINS","filter","p","labelPlugins","image","disabled","math","audio","video"],"mappings":";;;;;;;AAAA;;AAEO,IAAMA,sBAAsB,GAAG,CAACC,iCAAmB,EAApB,EAAwBC,MAAxB,CACpC,UAACC,CAAD;AAAA,SAAOA,CAAC,KAAK,OAAN,IAAiBA,CAAC,KAAK,eAAvB,IAA0CA,CAAC,KAAK,eAAvD;AAAA,CADoC,CAA/B;;AAIA,IAAMC,YAAY,GAAG;AAC1BC,EAAAA,KAAK,EAAE;AAAEC,IAAAA,QAAQ,EAAE;AAAZ,GADmB;AAE1BC,EAAAA,IAAI,EAAE;AAAED,IAAAA,QAAQ,EAAE;AAAZ,GAFoB;AAG1BE,EAAAA,KAAK,EAAE;AAAEF,IAAAA,QAAQ,EAAE;AAAZ,GAHmB;AAI1BG,EAAAA,KAAK,EAAE;AAAEH,IAAAA,QAAQ,EAAE;AAAZ;AAJmB,CAArB","sourcesContent":["import { DEFAULT_PLUGINS } from '@pie-lib/pie-toolbox/editable-html';\n\nexport const filteredDefaultPlugins = (DEFAULT_PLUGINS || []).filter(\n (p) => p !== 'table' && p !== 'bulleted-list' && p !== 'numbered-list',\n);\n\nexport const labelPlugins = {\n image: { disabled: true },\n math: { disabled: true },\n audio: { disabled: true },\n video: { disabled: true },\n};\n"],"file":"utils.js"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pie-element/multi-trait-rubric-configure",
|
|
3
|
-
"version": "3.0.3",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"module": "src/index.js",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@material-ui/core": "^3.9.2",
|
|
9
|
-
"@material-ui/icons": "^3.0.1",
|
|
10
|
-
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
11
|
-
"@pie-lib/pie-toolbox": "1.2.3",
|
|
12
|
-
"debug": "^3.1.0",
|
|
13
|
-
"lodash": "^4.17.15",
|
|
14
|
-
"prop-types": "^15.6.2",
|
|
15
|
-
"react": "^16.8.1",
|
|
16
|
-
"react-dom": "^16.8.1"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[]
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [2.0.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@2.0.2...@pie-element/multi-trait-rubric-controller@2.0.3) (2023-11-27)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* update pie-lib ([74283d7](https://github.com/pie-framework/pie-elements/commit/74283d71b12ab9c82875ce995368e5e39f4face6))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## [2.0.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@2.0.1...@pie-element/multi-trait-rubric-controller@2.0.2) (2023-11-27)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Bug Fixes
|
|
21
|
-
|
|
22
|
-
* update pie-lib/pie-toolbox PD-597 ([1ec84aa](https://github.com/pie-framework/pie-elements/commit/1ec84aadae515088ef65b99f780a5e5dca516f99))
|
|
23
|
-
* update pie-libs PD-2996 ([cd092c6](https://github.com/pie-framework/pie-elements/commit/cd092c6b5c4db91645394cd23febc1f9a07f46f9))
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## [2.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@2.0.0...@pie-element/multi-trait-rubric-controller@2.0.1) (2023-11-09)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Bug Fixes
|
|
33
|
-
|
|
34
|
-
* update pie-lib/pie-toolbox PD-3221, PD-3249, PD-2765 ([9de1563](https://github.com/pie-framework/pie-elements/commit/9de1563d636983c3ddceee0279c0709d396d4f96))
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
# [2.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.4.0...@pie-element/multi-trait-rubric-controller@2.0.0) (2023-11-07)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
### Bug Fixes
|
|
44
|
-
|
|
45
|
-
* update pie-lib version to fix imports for pie-lib/pie-toolbox/editable-html ([a90cbf6](https://github.com/pie-framework/pie-elements/commit/a90cbf6be81824e7266df23c2dc49b259337c1b6))
|
|
46
|
-
* update pie-lib/pie-toolbox version ([212cbfa](https://github.com/pie-framework/pie-elements/commit/212cbfad27b29f0b1b2a3706ba82f6fb59147001))
|
|
47
|
-
* update pie-lib/pie-toolbox version ([b791e10](https://github.com/pie-framework/pie-elements/commit/b791e10857928766e2d73c6aa80b3fb50fd1afac))
|
|
48
|
-
* update pie-lib/pie-toolbox version ([7f64f9f](https://github.com/pie-framework/pie-elements/commit/7f64f9f2b874fd08bd8f6f05c1c4292c34ac6338))
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### Code Refactoring
|
|
52
|
-
|
|
53
|
-
* replaced all pie-lib packages with the new pie-toolbox package that contains all of them. ([073d7e5](https://github.com/pie-framework/pie-elements/commit/073d7e5175f7a73069f09d2ceda799682acce494))
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### BREAKING CHANGES
|
|
57
|
-
|
|
58
|
-
* using pie-lib/pie-toolbox now, instead of any other pie-lib package.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
# [1.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.3.5...@pie-element/multi-trait-rubric-controller@1.4.0) (2023-07-06)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
### Bug Fixes
|
|
68
|
-
|
|
69
|
-
* **multi-trait-rubric:** fix conflicts ([52f3c3d](https://github.com/pie-framework/pie-elements/commit/52f3c3d87cca681094c1475085dce9f0cf395030))
|
|
70
|
-
* updated editable-html dependent packages for PD-2150 ([ffa6297](https://github.com/pie-framework/pie-elements/commit/ffa62977a9e329c1e12ea1dfcb2af4ba4c993bca))
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### Features
|
|
74
|
-
|
|
75
|
-
* **multi-trait-rubric:** PD-2872-add validations in controller ([8d31062](https://github.com/pie-framework/pie-elements/commit/8d31062f539455d22382ed07e13a97fd93c5847b))
|
|
76
|
-
* **multi-trait-rubric:** PD-2872-call imported method without this ([567372f](https://github.com/pie-framework/pie-elements/commit/567372f5806c0e0a54fc31727f20ce97369538e7))
|
|
77
|
-
* **multi-trait-rubric:** PD-2872-ui part of validations ([bba8c0c](https://github.com/pie-framework/pie-elements/commit/bba8c0cd410cb1968c5f144c97aded00624cece2))
|
|
78
|
-
* **multi-trait-rubric:** solve review observations ([b4aef59](https://github.com/pie-framework/pie-elements/commit/b4aef594a59c80530b3049cc30754eef905982ed))
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
## [1.3.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.3.4...@pie-element/multi-trait-rubric-controller@1.3.5) (2023-06-13)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
### Bug Fixes
|
|
88
|
-
|
|
89
|
-
* **multi-trait-rubric:** use the first scale trait label only if defaultTraitLabel is not defined PD-2869 ([87cf86f](https://github.com/pie-framework/pie-elements/commit/87cf86fe29d4cf6dbcbed800dd009b590b82fbf7))
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## [1.3.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.3.3...@pie-element/multi-trait-rubric-controller@1.3.4) (2023-05-02)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
### Bug Fixes
|
|
99
|
-
|
|
100
|
-
* update pie-libs (fix eslint problems PD-2732) ([3fa630e](https://github.com/pie-framework/pie-elements/commit/3fa630eb96b116cb685ab58fbf216fb572d1c333))
|
|
101
|
-
* **pie-elements:** avoid logs pbs and add fragments as containers ([b4bd2b7](https://github.com/pie-framework/pie-elements/commit/b4bd2b7f994d7affdac443bd486047e5a629b763))
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
## [1.3.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.3.2...@pie-element/multi-trait-rubric-controller@1.3.3) (2023-04-25)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
### Bug Fixes
|
|
111
|
-
|
|
112
|
-
* update pie-libs PD-2762 ([7ac4313](https://github.com/pie-framework/pie-elements/commit/7ac431346b822fe3bbb0d13375f044f6ce1f426b))
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
## [1.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.3.1...@pie-element/multi-trait-rubric-controller@1.3.2) (2023-03-30)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
### Bug Fixes
|
|
122
|
-
|
|
123
|
-
* revert adding pie-lib/rubric and remove its usage from controller ([2e58a35](https://github.com/pie-framework/pie-elements/commit/2e58a35e3490f4c002c82206eec3b74b215f3e57))
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
## [1.3.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.3.0...@pie-element/multi-trait-rubric-controller@1.3.1) (2023-03-30)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
### Bug Fixes
|
|
133
|
-
|
|
134
|
-
* add dependencies ([4156132](https://github.com/pie-framework/pie-elements/commit/415613209380f7bc613b1ae7908586bbe43e32bf))
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
# [1.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.13...@pie-element/multi-trait-rubric-controller@1.3.0) (2023-02-01)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
### Features
|
|
144
|
-
|
|
145
|
-
* update pie-libs ([0af590d](https://github.com/pie-framework/pie-elements/commit/0af590d624f4b2c0af58039e935531cef52e2a86))
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
## [1.2.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.12...@pie-element/multi-trait-rubric-controller@1.2.13) (2023-01-17)
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
### Bug Fixes
|
|
155
|
-
|
|
156
|
-
* **multi-trait-rubric:** fix validation bugs, update documentation. Fixed match docs typo PD-2427 ([26d598e](https://github.com/pie-framework/pie-elements/commit/26d598e7a32d50ed176d566605bb6b4ebdc07a2c))
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
## [1.2.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.11...@pie-element/multi-trait-rubric-controller@1.2.12) (2022-12-07)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
### Bug Fixes
|
|
166
|
-
|
|
167
|
-
* update libs ([441f403](https://github.com/pie-framework/pie-elements/commit/441f403870b7bec0d61fab58b8d93dbe0ead4c32))
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
## [1.2.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.6...@pie-element/multi-trait-rubric-controller@1.2.8) (2021-11-11)
|
|
174
|
-
|
|
175
|
-
**Note:** Version bump only for package @pie-element/multi-trait-rubric-controller
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
## [1.2.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.6...@pie-element/multi-trait-rubric-controller@1.2.7) (2021-11-11)
|
|
182
|
-
|
|
183
|
-
**Note:** Version bump only for package @pie-element/multi-trait-rubric-controller
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
## [1.2.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.4...@pie-element/multi-trait-rubric-controller@1.2.6) (2021-08-05)
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
### Bug Fixes
|
|
193
|
-
|
|
194
|
-
* force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
## [1.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.3...@pie-element/multi-trait-rubric-controller@1.2.4) (2021-06-29)
|
|
201
|
-
|
|
202
|
-
**Note:** Version bump only for package @pie-element/multi-trait-rubric-controller
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
## [1.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.0...@pie-element/multi-trait-rubric-controller@1.2.3) (2021-03-03)
|
|
209
|
-
|
|
210
|
-
**Note:** Version bump only for package @pie-element/multi-trait-rubric-controller
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
# [1.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.1.0...@pie-element/multi-trait-rubric-controller@1.2.0) (2021-03-03)
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
### Features
|
|
220
|
-
|
|
221
|
-
* Updated design. Moved exclude zero at item level. Added ability to toggle from Settings Panel: level tag input, description, standards, visibility to student, half scoring, score labels, drag and drop. Added Actionable List. BREAKING CHANGE: moved exclude zero at item level (from scale level) ([c8bb906](https://github.com/pie-framework/pie-elements/commit/c8bb9064712aae057b74dceba5928a19054b27eb))
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
# 1.1.0 (2021-02-02)
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
### Features
|
|
231
|
-
|
|
232
|
-
* Added showStandards configuration setting. Added halfScoring and visibleToStudent. ([db993ca](https://github.com/pie-framework/pie-elements/commit/db993ca))
|
|
233
|
-
* multi-trait-rubric (No authoring yet) ([dc01b01](https://github.com/pie-framework/pie-elements/commit/dc01b01))
|