@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
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _default = {
|
|
8
|
-
model: {
|
|
9
|
-
points: ['', '', '', ''],
|
|
10
|
-
sampleAnswers: [null, null, null, null],
|
|
11
|
-
maxPoints: 4,
|
|
12
|
-
excludeZero: false,
|
|
13
|
-
excludeZeroEnabled: true,
|
|
14
|
-
maxPointsEnabled: true
|
|
15
|
-
},
|
|
16
|
-
configuration: {
|
|
17
|
-
showExcludeZero: {
|
|
18
|
-
settings: true,
|
|
19
|
-
label: 'Ability to exclude zero'
|
|
20
|
-
},
|
|
21
|
-
showMaxPoint: {
|
|
22
|
-
settings: true,
|
|
23
|
-
label: 'Show max points dropdown'
|
|
24
|
-
},
|
|
25
|
-
settingsPanelDisabled: false,
|
|
26
|
-
// width: '500px'
|
|
27
|
-
mathMlOptions: {
|
|
28
|
-
mmlOutput: false,
|
|
29
|
-
mmlEditing: false
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports["default"] = _default;
|
|
34
|
-
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","points","sampleAnswers","maxPoints","excludeZero","excludeZeroEnabled","maxPointsEnabled","configuration","showExcludeZero","settings","label","showMaxPoint","settingsPanelDisabled","mathMlOptions","mmlOutput","mmlEditing"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,CAAC,EAAD,EAAK,EAAL,EAAS,EAAT,EAAa,EAAb,CADH;AAELC,IAAAA,aAAa,EAAE,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,CAFV;AAGLC,IAAAA,SAAS,EAAE,CAHN;AAILC,IAAAA,WAAW,EAAE,KAJR;AAKLC,IAAAA,kBAAkB,EAAE,IALf;AAMLC,IAAAA,gBAAgB,EAAE;AANb,GADM;AASbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,eAAe,EAAE;AACfC,MAAAA,QAAQ,EAAE,IADK;AAEfC,MAAAA,KAAK,EAAE;AAFQ,KADJ;AAKbC,IAAAA,YAAY,EAAE;AACZF,MAAAA,QAAQ,EAAE,IADE;AAEZC,MAAAA,KAAK,EAAE;AAFK,KALD;AASbE,IAAAA,qBAAqB,EAAE,KATV;AAUb;AACAC,IAAAA,aAAa,EAAE;AACbC,MAAAA,SAAS,EAAE,KADE;AAEbC,MAAAA,UAAU,EAAE;AAFC;AAXF;AATF,C","sourcesContent":["export default {\n model: {\n points: ['', '', '', ''],\n sampleAnswers: [null, null, null, null],\n maxPoints: 4,\n excludeZero: false,\n excludeZeroEnabled: true,\n maxPointsEnabled: true,\n },\n configuration: {\n showExcludeZero: {\n settings: true,\n label: 'Ability to exclude zero',\n },\n showMaxPoint: {\n settings: true,\n label: 'Show max points dropdown',\n },\n settingsPanelDisabled: false,\n // width: '500px'\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n }\n },\n};\n"],"file":"defaults.js"}
|
|
@@ -1,130 +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"] = 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 _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
23
|
-
|
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
|
|
26
|
-
var _pieConfigureEvents = require("@pie-framework/pie-configure-events");
|
|
27
|
-
|
|
28
|
-
var _react = _interopRequireDefault(require("react"));
|
|
29
|
-
|
|
30
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
31
|
-
|
|
32
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
33
|
-
|
|
34
|
-
var _main = _interopRequireDefault(require("./main"));
|
|
35
|
-
|
|
36
|
-
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
37
|
-
|
|
38
|
-
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); }; }
|
|
39
|
-
|
|
40
|
-
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; } }
|
|
41
|
-
|
|
42
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
43
|
-
|
|
44
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
45
|
-
|
|
46
|
-
var modelWithDefaults = function modelWithDefaults(m) {
|
|
47
|
-
return _objectSpread(_objectSpread({}, _defaults["default"].model), m);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
var configurationWithDefaults = function configurationWithDefaults(c) {
|
|
51
|
-
return _objectSpread(_objectSpread({}, _defaults["default"].configuration), c);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
var RubricElement = /*#__PURE__*/function (_HTMLElement) {
|
|
55
|
-
(0, _inherits2["default"])(RubricElement, _HTMLElement);
|
|
56
|
-
|
|
57
|
-
var _super = _createSuper(RubricElement);
|
|
58
|
-
|
|
59
|
-
function RubricElement() {
|
|
60
|
-
var _this;
|
|
61
|
-
|
|
62
|
-
(0, _classCallCheck2["default"])(this, RubricElement);
|
|
63
|
-
_this = _super.call(this);
|
|
64
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onConfigurationChanged", function (c) {
|
|
65
|
-
_this._configuration = configurationWithDefaults(c);
|
|
66
|
-
|
|
67
|
-
if (_this._model) {
|
|
68
|
-
_this.onModelChanged(_this._model);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
_this._render();
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
_debug["default"].log('constructor called');
|
|
75
|
-
|
|
76
|
-
_this._model = modelWithDefaults();
|
|
77
|
-
_this._configuration = configurationWithDefaults();
|
|
78
|
-
_this.onModelChanged = _this.onModelChanged.bind((0, _assertThisInitialized2["default"])(_this));
|
|
79
|
-
_this.onConfigurationChanged = _this.onConfigurationChanged.bind((0, _assertThisInitialized2["default"])(_this));
|
|
80
|
-
return _this;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
(0, _createClass2["default"])(RubricElement, [{
|
|
84
|
-
key: "model",
|
|
85
|
-
set: function set(m) {
|
|
86
|
-
this._model = modelWithDefaults(m);
|
|
87
|
-
|
|
88
|
-
this._render();
|
|
89
|
-
}
|
|
90
|
-
}, {
|
|
91
|
-
key: "configuration",
|
|
92
|
-
set: function set(c) {
|
|
93
|
-
this._configuration = configurationWithDefaults(c);
|
|
94
|
-
|
|
95
|
-
this._render();
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
key: "onModelChanged",
|
|
99
|
-
value: function onModelChanged(m) {
|
|
100
|
-
this._model = m;
|
|
101
|
-
|
|
102
|
-
this._render();
|
|
103
|
-
|
|
104
|
-
this.dispatchEvent(new _pieConfigureEvents.ModelUpdatedEvent(this._model, false));
|
|
105
|
-
}
|
|
106
|
-
}, {
|
|
107
|
-
key: "connectedCallback",
|
|
108
|
-
value: function connectedCallback() {
|
|
109
|
-
this._render();
|
|
110
|
-
}
|
|
111
|
-
}, {
|
|
112
|
-
key: "_render",
|
|
113
|
-
value: function _render() {
|
|
114
|
-
if (this._model) {
|
|
115
|
-
var element = /*#__PURE__*/_react["default"].createElement(_main["default"], {
|
|
116
|
-
model: this._model,
|
|
117
|
-
configuration: this._configuration,
|
|
118
|
-
onModelChanged: this.onModelChanged,
|
|
119
|
-
onConfigurationChanged: this.onConfigurationChanged
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
_reactDom["default"].render(element, this);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}]);
|
|
126
|
-
return RubricElement;
|
|
127
|
-
}( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLElement));
|
|
128
|
-
|
|
129
|
-
exports["default"] = RubricElement;
|
|
130
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["modelWithDefaults","m","defaults","model","configurationWithDefaults","c","configuration","RubricElement","_configuration","_model","onModelChanged","_render","debug","log","bind","onConfigurationChanged","dispatchEvent","ModelUpdatedEvent","element","React","createElement","Main","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,CAAD;AAAA,yCAAaC,qBAASC,KAAtB,GAAgCF,CAAhC;AAAA,CAA1B;;AACA,IAAMG,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,CAAD;AAAA,yCAAaH,qBAASI,aAAtB,GAAwCD,CAAxC;AAAA,CAAlC;;IAEqBE,a;;;;;AACnB,2BAAc;AAAA;;AAAA;AACZ;AADY,+GAyBW,UAACF,CAAD,EAAO;AAC9B,YAAKG,cAAL,GAAsBJ,yBAAyB,CAACC,CAAD,CAA/C;;AAEA,UAAI,MAAKI,MAAT,EAAiB;AACf,cAAKC,cAAL,CAAoB,MAAKD,MAAzB;AACD;;AAED,YAAKE,OAAL;AACD,KAjCa;;AAEZC,sBAAMC,GAAN,CAAU,oBAAV;;AACA,UAAKJ,MAAL,GAAcT,iBAAiB,EAA/B;AACA,UAAKQ,cAAL,GAAsBJ,yBAAyB,EAA/C;AACA,UAAKM,cAAL,GAAsB,MAAKA,cAAL,CAAoBI,IAApB,gDAAtB;AACA,UAAKC,sBAAL,GAA8B,MAAKA,sBAAL,CAA4BD,IAA5B,gDAA9B;AANY;AAOb;;;;SAED,aAAUb,CAAV,EAAa;AACX,WAAKQ,MAAL,GAAcT,iBAAiB,CAACC,CAAD,CAA/B;;AACA,WAAKU,OAAL;AACD;;;SAED,aAAkBN,CAAlB,EAAqB;AACnB,WAAKG,cAAL,GAAsBJ,yBAAyB,CAACC,CAAD,CAA/C;;AACA,WAAKM,OAAL;AACD;;;WAED,wBAAeV,CAAf,EAAkB;AAChB,WAAKQ,MAAL,GAAcR,CAAd;;AACA,WAAKU,OAAL;;AACA,WAAKK,aAAL,CAAmB,IAAIC,qCAAJ,CAAsB,KAAKR,MAA3B,EAAmC,KAAnC,CAAnB;AACD;;;WAYD,6BAAoB;AAClB,WAAKE,OAAL;AACD;;;WAED,mBAAU;AACR,UAAI,KAAKF,MAAT,EAAiB;AACf,YAAIS,OAAO,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACtClB,UAAAA,KAAK,EAAE,KAAKM,MAD0B;AAEtCH,UAAAA,aAAa,EAAE,KAAKE,cAFkB;AAGtCE,UAAAA,cAAc,EAAE,KAAKA,cAHiB;AAItCK,UAAAA,sBAAsB,EAAE,KAAKA;AAJS,SAA1B,CAAd;;AAOAO,6BAASC,MAAT,CAAgBL,OAAhB,EAAyB,IAAzB;AACD;AACF;;;kDAnDwCM,W","sourcesContent":["import { ModelUpdatedEvent } from '@pie-framework/pie-configure-events';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport debug from 'debug';\n\nimport Main from './main';\nimport defaults from './defaults';\n\nconst modelWithDefaults = (m) => ({ ...defaults.model, ...m });\nconst configurationWithDefaults = (c) => ({ ...defaults.configuration, ...c });\n\nexport default class RubricElement extends HTMLElement {\n constructor() {\n super();\n debug.log('constructor called');\n this._model = modelWithDefaults();\n this._configuration = configurationWithDefaults();\n this.onModelChanged = this.onModelChanged.bind(this);\n this.onConfigurationChanged = this.onConfigurationChanged.bind(this);\n }\n\n set model(m) {\n this._model = modelWithDefaults(m);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = configurationWithDefaults(c);\n this._render();\n }\n\n onModelChanged(m) {\n this._model = m;\n this._render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n onConfigurationChanged = (c) => {\n this._configuration = configurationWithDefaults(c);\n\n if (this._model) {\n this.onModelChanged(this._model);\n }\n\n this._render();\n };\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (this._model) {\n let element = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n });\n\n ReactDOM.render(element, this);\n }\n }\n}\n"],"file":"index.js"}
|
|
@@ -1,108 +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"] = 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 _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
|
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
|
|
18
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireDefault(require("react"));
|
|
21
|
-
|
|
22
|
-
var _rubric = require("@pie-lib/pie-toolbox/rubric");
|
|
23
|
-
|
|
24
|
-
var _styles = require("@material-ui/core/styles");
|
|
25
|
-
|
|
26
|
-
var _configUi = require("@pie-lib/pie-toolbox/config-ui");
|
|
27
|
-
|
|
28
|
-
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); }; }
|
|
29
|
-
|
|
30
|
-
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; } }
|
|
31
|
-
|
|
32
|
-
var Panel = _configUi.settings.Panel,
|
|
33
|
-
toggle = _configUi.settings.toggle;
|
|
34
|
-
|
|
35
|
-
var styles = function styles(theme) {
|
|
36
|
-
return {
|
|
37
|
-
design: {
|
|
38
|
-
fontFamily: 'Cerebri Sans',
|
|
39
|
-
fontSize: theme.typography.fontSize
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
var Main = /*#__PURE__*/function (_React$Component) {
|
|
45
|
-
(0, _inherits2["default"])(Main, _React$Component);
|
|
46
|
-
|
|
47
|
-
var _super = _createSuper(Main);
|
|
48
|
-
|
|
49
|
-
function Main() {
|
|
50
|
-
(0, _classCallCheck2["default"])(this, Main);
|
|
51
|
-
return _super.apply(this, arguments);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
(0, _createClass2["default"])(Main, [{
|
|
55
|
-
key: "render",
|
|
56
|
-
value: function render() {
|
|
57
|
-
var _ref = this.props || {},
|
|
58
|
-
model = _ref.model,
|
|
59
|
-
configuration = _ref.configuration,
|
|
60
|
-
onConfigurationChanged = _ref.onConfigurationChanged,
|
|
61
|
-
onModelChanged = _ref.onModelChanged;
|
|
62
|
-
|
|
63
|
-
var _ref2 = configuration || {},
|
|
64
|
-
_ref2$contentDimensio = _ref2.contentDimensions,
|
|
65
|
-
contentDimensions = _ref2$contentDimensio === void 0 ? {} : _ref2$contentDimensio,
|
|
66
|
-
settingsPanelDisabled = _ref2.settingsPanelDisabled,
|
|
67
|
-
_ref2$showExcludeZero = _ref2.showExcludeZero,
|
|
68
|
-
showExcludeZero = _ref2$showExcludeZero === void 0 ? {} : _ref2$showExcludeZero,
|
|
69
|
-
_ref2$showMaxPoint = _ref2.showMaxPoint,
|
|
70
|
-
showMaxPoint = _ref2$showMaxPoint === void 0 ? {} : _ref2$showMaxPoint,
|
|
71
|
-
_ref2$mathMlOptions = _ref2.mathMlOptions,
|
|
72
|
-
mathMlOptions = _ref2$mathMlOptions === void 0 ? {} : _ref2$mathMlOptions,
|
|
73
|
-
width = _ref2.width;
|
|
74
|
-
|
|
75
|
-
var panelProperties = {
|
|
76
|
-
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
77
|
-
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label)
|
|
78
|
-
};
|
|
79
|
-
return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
80
|
-
dimensions: contentDimensions,
|
|
81
|
-
hideSettings: settingsPanelDisabled,
|
|
82
|
-
settings: /*#__PURE__*/_react["default"].createElement(Panel, {
|
|
83
|
-
model: model,
|
|
84
|
-
onChangeModel: onModelChanged,
|
|
85
|
-
configuration: configuration,
|
|
86
|
-
onChangeConfiguration: onConfigurationChanged,
|
|
87
|
-
groups: {
|
|
88
|
-
Properties: panelProperties
|
|
89
|
-
}
|
|
90
|
-
})
|
|
91
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
|
-
style: {
|
|
93
|
-
maxWidth: width
|
|
94
|
-
}
|
|
95
|
-
}, /*#__PURE__*/_react["default"].createElement(_rubric.Authoring, {
|
|
96
|
-
value: model,
|
|
97
|
-
onChange: onModelChanged,
|
|
98
|
-
mathMlOptions: mathMlOptions
|
|
99
|
-
})));
|
|
100
|
-
}
|
|
101
|
-
}]);
|
|
102
|
-
return Main;
|
|
103
|
-
}(_react["default"].Component);
|
|
104
|
-
|
|
105
|
-
var _default = (0, _styles.withStyles)(styles)(Main);
|
|
106
|
-
|
|
107
|
-
exports["default"] = _default;
|
|
108
|
-
//# sourceMappingURL=main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","styles","theme","design","fontFamily","fontSize","typography","Main","props","model","configuration","onConfigurationChanged","onModelChanged","contentDimensions","settingsPanelDisabled","showExcludeZero","showMaxPoint","mathMlOptions","width","panelProperties","excludeZeroEnabled","label","maxPointsEnabled","Properties","maxWidth","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,UAAU,EAAE,cADN;AAENC,MAAAA,QAAQ,EAAEH,KAAK,CAACI,UAAN,CAAiBD;AAFrB;AADiB,GAAZ;AAAA,CAAf;;IAOME,I;;;;;;;;;;;;WACJ,kBAAS;AACP,iBAAyE,KAAKC,KAAL,IAAc,EAAvF;AAAA,UAAQC,KAAR,QAAQA,KAAR;AAAA,UAAeC,aAAf,QAAeA,aAAf;AAAA,UAA8BC,sBAA9B,QAA8BA,sBAA9B;AAAA,UAAsDC,cAAtD,QAAsDA,cAAtD;;AACA,kBAOIF,aAAa,IAAI,EAPrB;AAAA,wCACEG,iBADF;AAAA,UACEA,iBADF,sCACsB,EADtB;AAAA,UAEEC,qBAFF,SAEEA,qBAFF;AAAA,wCAGEC,eAHF;AAAA,UAGEA,eAHF,sCAGoB,EAHpB;AAAA,qCAIEC,YAJF;AAAA,UAIEA,YAJF,mCAIiB,EAJjB;AAAA,sCAKEC,aALF;AAAA,UAKEA,aALF,oCAKkB,EALlB;AAAA,UAMEC,KANF,SAMEA,KANF;;AASA,UAAMC,eAAe,GAAG;AACtBC,QAAAA,kBAAkB,EAAEL,eAAe,CAAChB,QAAhB,IAA4BC,MAAM,CAACe,eAAe,CAACM,KAAjB,CADhC;AAEtBC,QAAAA,gBAAgB,EAAEN,YAAY,CAACjB,QAAb,IAAyBC,MAAM,CAACgB,YAAY,CAACK,KAAd;AAF3B,OAAxB;AAKA,0BACE,gCAAC,gBAAD,CAAQ,YAAR;AACE,QAAA,UAAU,EAAER,iBADd;AAEE,QAAA,YAAY,EAAEC,qBAFhB;AAGE,QAAA,QAAQ,eACN,gCAAC,KAAD;AACE,UAAA,KAAK,EAAEL,KADT;AAEE,UAAA,aAAa,EAAEG,cAFjB;AAGE,UAAA,aAAa,EAAEF,aAHjB;AAIE,UAAA,qBAAqB,EAAEC,sBAJzB;AAKE,UAAA,MAAM,EAAE;AACNY,YAAAA,UAAU,EAAEJ;AADN;AALV;AAJJ,sBAeE;AAAK,QAAA,KAAK,EAAE;AAAEK,UAAAA,QAAQ,EAAEN;AAAZ;AAAZ,sBACE,gCAAC,iBAAD;AAAW,QAAA,KAAK,EAAET,KAAlB;AAAyB,QAAA,QAAQ,EAAEG,cAAnC;AAAmD,QAAA,aAAa,EAAEK;AAAlE,QADF,CAfF,CADF;AAqBD;;;EAtCgBQ,kBAAMC,S;;eAyCV,wBAAWzB,MAAX,EAAmBM,IAAnB,C","sourcesContent":["import React from 'react';\nimport { Authoring } from '@pie-lib/pie-toolbox/rubric';\nimport { withStyles } from '@material-ui/core/styles';\nimport { layout, settings } from '@pie-lib/pie-toolbox/config-ui';\n\nconst { Panel, toggle } = settings;\n\nconst styles = (theme) => ({\n design: {\n fontFamily: 'Cerebri Sans',\n fontSize: theme.typography.fontSize,\n },\n});\n\nclass Main extends React.Component {\n render() {\n const { model, configuration, onConfigurationChanged, onModelChanged } = this.props || {};\n const {\n contentDimensions = {},\n settingsPanelDisabled,\n showExcludeZero = {},\n showMaxPoint = {},\n mathMlOptions = {},\n width,\n } = configuration || {};\n\n const panelProperties = {\n excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),\n maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),\n };\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Properties: panelProperties,\n }}\n />\n }\n >\n <div style={{ maxWidth: width }}>\n <Authoring value={model} onChange={onModelChanged} mathMlOptions={mathMlOptions} />\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles(styles)(Main);\n"],"file":"main.js"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pie-element/rubric-configure",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "3.0.3",
|
|
5
|
-
"description": "Rubric authoring view",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"author": "Pie Framework Authors",
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"@material-ui/core": "^3.9.2",
|
|
10
|
-
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
11
|
-
"@pie-lib/pie-toolbox": "1.2.3",
|
|
12
|
-
"debug": "^4.1.1",
|
|
13
|
-
"react": "^16.8.6",
|
|
14
|
-
"react-dom": "^16.8.6"
|
|
15
|
-
},
|
|
16
|
-
"license": "ISC"
|
|
17
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
model: {
|
|
3
|
-
points: ['', '', '', ''],
|
|
4
|
-
sampleAnswers: [null, null, null, null],
|
|
5
|
-
maxPoints: 4,
|
|
6
|
-
excludeZero: false,
|
|
7
|
-
excludeZeroEnabled: true,
|
|
8
|
-
maxPointsEnabled: true,
|
|
9
|
-
},
|
|
10
|
-
configuration: {
|
|
11
|
-
showExcludeZero: {
|
|
12
|
-
settings: true,
|
|
13
|
-
label: 'Ability to exclude zero',
|
|
14
|
-
},
|
|
15
|
-
showMaxPoint: {
|
|
16
|
-
settings: true,
|
|
17
|
-
label: 'Show max points dropdown',
|
|
18
|
-
},
|
|
19
|
-
settingsPanelDisabled: false,
|
|
20
|
-
// width: '500px'
|
|
21
|
-
mathMlOptions: {
|
|
22
|
-
mmlOutput: false,
|
|
23
|
-
mmlEditing: false,
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { ModelUpdatedEvent } from '@pie-framework/pie-configure-events';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import ReactDOM from 'react-dom';
|
|
4
|
-
import debug from 'debug';
|
|
5
|
-
|
|
6
|
-
import Main from './main';
|
|
7
|
-
import defaults from './defaults';
|
|
8
|
-
|
|
9
|
-
const modelWithDefaults = (m) => ({ ...defaults.model, ...m });
|
|
10
|
-
const configurationWithDefaults = (c) => ({ ...defaults.configuration, ...c });
|
|
11
|
-
|
|
12
|
-
export default class RubricElement extends HTMLElement {
|
|
13
|
-
constructor() {
|
|
14
|
-
super();
|
|
15
|
-
debug.log('constructor called');
|
|
16
|
-
this._model = modelWithDefaults();
|
|
17
|
-
this._configuration = configurationWithDefaults();
|
|
18
|
-
this.onModelChanged = this.onModelChanged.bind(this);
|
|
19
|
-
this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
set model(m) {
|
|
23
|
-
this._model = modelWithDefaults(m);
|
|
24
|
-
this._render();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
set configuration(c) {
|
|
28
|
-
this._configuration = configurationWithDefaults(c);
|
|
29
|
-
this._render();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
onModelChanged(m) {
|
|
33
|
-
this._model = m;
|
|
34
|
-
this._render();
|
|
35
|
-
this.dispatchEvent(new ModelUpdatedEvent(this._model, false));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onConfigurationChanged = (c) => {
|
|
39
|
-
this._configuration = configurationWithDefaults(c);
|
|
40
|
-
|
|
41
|
-
if (this._model) {
|
|
42
|
-
this.onModelChanged(this._model);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
this._render();
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
connectedCallback() {
|
|
49
|
-
this._render();
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
_render() {
|
|
53
|
-
if (this._model) {
|
|
54
|
-
let element = React.createElement(Main, {
|
|
55
|
-
model: this._model,
|
|
56
|
-
configuration: this._configuration,
|
|
57
|
-
onModelChanged: this.onModelChanged,
|
|
58
|
-
onConfigurationChanged: this.onConfigurationChanged,
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
ReactDOM.render(element, this);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Authoring } from '@pie-lib/pie-toolbox/rubric';
|
|
3
|
-
import { withStyles } from '@material-ui/core/styles';
|
|
4
|
-
import { layout, settings } from '@pie-lib/pie-toolbox/config-ui';
|
|
5
|
-
|
|
6
|
-
const { Panel, toggle } = settings;
|
|
7
|
-
|
|
8
|
-
const styles = (theme) => ({
|
|
9
|
-
design: {
|
|
10
|
-
fontFamily: 'Cerebri Sans',
|
|
11
|
-
fontSize: theme.typography.fontSize,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
class Main extends React.Component {
|
|
16
|
-
render() {
|
|
17
|
-
const { model, configuration, onConfigurationChanged, onModelChanged } = this.props || {};
|
|
18
|
-
const {
|
|
19
|
-
contentDimensions = {},
|
|
20
|
-
settingsPanelDisabled,
|
|
21
|
-
showExcludeZero = {},
|
|
22
|
-
showMaxPoint = {},
|
|
23
|
-
mathMlOptions = {},
|
|
24
|
-
width,
|
|
25
|
-
} = configuration || {};
|
|
26
|
-
|
|
27
|
-
const panelProperties = {
|
|
28
|
-
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
29
|
-
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<layout.ConfigLayout
|
|
34
|
-
dimensions={contentDimensions}
|
|
35
|
-
hideSettings={settingsPanelDisabled}
|
|
36
|
-
settings={
|
|
37
|
-
<Panel
|
|
38
|
-
model={model}
|
|
39
|
-
onChangeModel={onModelChanged}
|
|
40
|
-
configuration={configuration}
|
|
41
|
-
onChangeConfiguration={onConfigurationChanged}
|
|
42
|
-
groups={{
|
|
43
|
-
Properties: panelProperties,
|
|
44
|
-
}}
|
|
45
|
-
/>
|
|
46
|
-
}
|
|
47
|
-
>
|
|
48
|
-
<div style={{ maxWidth: width }}>
|
|
49
|
-
<Authoring value={model} onChange={onModelChanged} mathMlOptions={mathMlOptions} />
|
|
50
|
-
</div>
|
|
51
|
-
</layout.ConfigLayout>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export default withStyles(styles)(Main);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"type": "fix",
|
|
4
|
-
"scope": null,
|
|
5
|
-
"subject": "bump all packages to avoid tag conflict",
|
|
6
|
-
"merge": null,
|
|
7
|
-
"header": "fix: bump all packages to avoid tag conflict",
|
|
8
|
-
"body": null,
|
|
9
|
-
"footer": null,
|
|
10
|
-
"notes": [],
|
|
11
|
-
"hash": "d9ec9a8689f0a391594b5e2f4ea958c6dc9f6d7b",
|
|
12
|
-
"gitTags": " (develop)",
|
|
13
|
-
"committerDate": "2020-04-10 20:01:37 +0100",
|
|
14
|
-
"isTagged": true,
|
|
15
|
-
"tag": "@pie-element/rubric-controller@1.1.1"
|
|
16
|
-
}
|
|
17
|
-
]
|