@pie-element/rubric 3.4.1-next.5 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/configure/CHANGELOG.md +18 -0
- package/configure/lib/defaults.js +24 -0
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/main.js +14 -1
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +2 -2
- package/configure/src/defaults.js +12 -0
- package/configure/src/main.jsx +19 -2
- package/controller/CHANGELOG.md +17 -0
- package/controller/package.json +2 -2
- package/docs/config-schema.json +111 -0
- package/docs/config-schema.json.md +80 -0
- package/docs/pie-schema.json +61 -0
- package/docs/pie-schema.json.md +44 -0
- package/module/configure.js +68 -10
- package/module/element.js +1 -1
- package/module/manifest.json +1 -1
- package/module/print.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@3.4.0...@pie-element/rubric@3.5.0) (2024-03-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Renamed the html prop to the correct math prop PD-3527 ([28061b6](https://github.com/pie-framework/pie-elements/commit/28061b6032817dae15837131d8a0bf5a08683b10))
|
|
12
|
+
* updated pie-lib/pie-toolbox SC-28500 ([a8e4e6a](https://github.com/pie-framework/pie-elements/commit/a8e4e6ab27584435ce7ac3e964ccac2747402777))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* Add configuration for custom buttons PD-3527 ([45a32bd](https://github.com/pie-framework/pie-elements/commit/45a32bd8e9d7bd33beca74cc10c7dd973a9f9dbc))
|
|
18
|
+
* Replace math-rendering package with math-rendering-accessible-package for accessibility PD-1870 ([b6cdee8](https://github.com/pie-framework/pie-elements/commit/b6cdee8915b06e4c11b002b10437db07ce966501))
|
|
19
|
+
* updated pie-lib/pie-toolbox SC-27890 and reverted once again math-rendering-accessible ([fd312e1](https://github.com/pie-framework/pie-elements/commit/fd312e1336999893025231946649496d290883e4))
|
|
20
|
+
* use math-rendering-accessible everywhere PD-1870 ([d52e660](https://github.com/pie-framework/pie-elements/commit/d52e6607ad8847d704bd9cb9b7e3107c130f0500))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# [3.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@3.3.2...@pie-element/rubric@3.4.0) (2024-03-15)
|
|
7
27
|
|
|
8
28
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@3.4.0...@pie-element/rubric-configure@3.5.0) (2024-03-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* updated pie-lib/pie-toolbox SC-28500 ([a8e4e6a](https://github.com/pie-framework/pie-elements/commit/a8e4e6ab27584435ce7ac3e964ccac2747402777))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Add configuration for custom buttons PD-3527 ([45a32bd](https://github.com/pie-framework/pie-elements/commit/45a32bd8e9d7bd33beca74cc10c7dd973a9f9dbc))
|
|
17
|
+
* updated pie-lib/pie-toolbox SC-27890 and reverted once again math-rendering-accessible ([fd312e1](https://github.com/pie-framework/pie-elements/commit/fd312e1336999893025231946649496d290883e4))
|
|
18
|
+
* use math-rendering-accessible everywhere PD-1870 ([d52e660](https://github.com/pie-framework/pie-elements/commit/d52e6607ad8847d704bd9cb9b7e3107c130f0500))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
# [3.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@3.3.2...@pie-element/rubric-configure@3.4.0) (2024-03-15)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -14,6 +14,30 @@ var _default = {
|
|
|
14
14
|
maxPointsEnabled: true
|
|
15
15
|
},
|
|
16
16
|
configuration: {
|
|
17
|
+
baseInputConfiguration: {
|
|
18
|
+
audio: {
|
|
19
|
+
disabled: false
|
|
20
|
+
},
|
|
21
|
+
video: {
|
|
22
|
+
disabled: false
|
|
23
|
+
},
|
|
24
|
+
image: {
|
|
25
|
+
disabled: false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
rubriclessInstruction: {
|
|
29
|
+
inputConfiguration: {
|
|
30
|
+
audio: {
|
|
31
|
+
disabled: false
|
|
32
|
+
},
|
|
33
|
+
video: {
|
|
34
|
+
disabled: false
|
|
35
|
+
},
|
|
36
|
+
image: {
|
|
37
|
+
disabled: false
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
17
41
|
showExcludeZero: {
|
|
18
42
|
settings: true,
|
|
19
43
|
label: 'Ability to exclude zero'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","points","sampleAnswers","maxPoints","excludeZero","excludeZeroEnabled","maxPointsEnabled","configuration","showExcludeZero","settings","label","showMaxPoint","settingsPanelDisabled","mathMlOptions","mmlOutput","mmlEditing","maxMaxPoints"],"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,
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","points","sampleAnswers","maxPoints","excludeZero","excludeZeroEnabled","maxPointsEnabled","configuration","baseInputConfiguration","audio","disabled","video","image","rubriclessInstruction","inputConfiguration","showExcludeZero","settings","label","showMaxPoint","settingsPanelDisabled","mathMlOptions","mmlOutput","mmlEditing","maxMaxPoints"],"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,sBAAsB,EAAE;AACtBC,MAAAA,KAAK,EAAE;AAAEC,QAAAA,QAAQ,EAAE;AAAZ,OADe;AAEtBC,MAAAA,KAAK,EAAE;AAAED,QAAAA,QAAQ,EAAE;AAAZ,OAFe;AAGtBE,MAAAA,KAAK,EAAE;AAAEF,QAAAA,QAAQ,EAAE;AAAZ;AAHe,KADX;AAMbG,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,kBAAkB,EAAE;AAClBL,QAAAA,KAAK,EAAE;AAAEC,UAAAA,QAAQ,EAAE;AAAZ,SADW;AAElBC,QAAAA,KAAK,EAAE;AAAED,UAAAA,QAAQ,EAAE;AAAZ,SAFW;AAGlBE,QAAAA,KAAK,EAAE;AAAEF,UAAAA,QAAQ,EAAE;AAAZ;AAHW;AADC,KANV;AAabK,IAAAA,eAAe,EAAE;AACfC,MAAAA,QAAQ,EAAE,IADK;AAEfC,MAAAA,KAAK,EAAE;AAFQ,KAbJ;AAiBbC,IAAAA,YAAY,EAAE;AACZF,MAAAA,QAAQ,EAAE,IADE;AAEZC,MAAAA,KAAK,EAAE;AAFK,KAjBD;AAqBbE,IAAAA,qBAAqB,EAAE,KArBV;AAsBb;AACAC,IAAAA,aAAa,EAAE;AACbC,MAAAA,SAAS,EAAE,KADE;AAEbC,MAAAA,UAAU,EAAE;AAFC,KAvBF;AA2BbC,IAAAA,YAAY,EAAE;AA3BD;AATF,C","sourcesContent":["export default {\n model: {\n points: ['', '', '', ''],\n sampleAnswers: [null, null, null, null],\n maxPoints: 3,\n excludeZero: false,\n excludeZeroEnabled: true,\n maxPointsEnabled: true,\n },\n configuration: {\n baseInputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n rubriclessInstruction: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\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 maxMaxPoints: 9,\n },\n};\n"],"file":"defaults.js"}
|
package/configure/lib/main.js
CHANGED
|
@@ -33,6 +33,10 @@ var _configUi = require("@pie-lib/pie-toolbox/config-ui");
|
|
|
33
33
|
|
|
34
34
|
var _excluded = ["points", "sampleAnswers"];
|
|
35
35
|
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
36
40
|
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); }; }
|
|
37
41
|
|
|
38
42
|
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; } }
|
|
@@ -89,6 +93,8 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
89
93
|
onModelChanged = _ref3.onModelChanged;
|
|
90
94
|
|
|
91
95
|
var _ref4 = configuration || {},
|
|
96
|
+
_ref4$baseInputConfig = _ref4.baseInputConfiguration,
|
|
97
|
+
baseInputConfiguration = _ref4$baseInputConfig === void 0 ? {} : _ref4$baseInputConfig,
|
|
92
98
|
_ref4$contentDimensio = _ref4.contentDimensions,
|
|
93
99
|
contentDimensions = _ref4$contentDimensio === void 0 ? {} : _ref4$contentDimensio,
|
|
94
100
|
settingsPanelDisabled = _ref4.settingsPanelDisabled,
|
|
@@ -110,6 +116,11 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
110
116
|
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),
|
|
111
117
|
rubriclessInstructionEnabled: rubricless && rubriclessInstruction.settings && toggle(rubriclessInstruction.label)
|
|
112
118
|
};
|
|
119
|
+
|
|
120
|
+
var getPluginProps = function getPluginProps(props) {
|
|
121
|
+
return Object.assign(_objectSpread({}, baseInputConfiguration), props || {});
|
|
122
|
+
};
|
|
123
|
+
|
|
113
124
|
return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
114
125
|
dimensions: contentDimensions,
|
|
115
126
|
hideSettings: settingsPanelDisabled,
|
|
@@ -118,6 +129,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
118
129
|
onChangeModel: onModelChanged,
|
|
119
130
|
configuration: configuration,
|
|
120
131
|
onChangeConfiguration: onConfigurationChanged,
|
|
132
|
+
pluginOpts: getPluginProps(rubriclessInstruction === null || rubriclessInstruction === void 0 ? void 0 : rubriclessInstruction.inputConfiguration),
|
|
121
133
|
groups: {
|
|
122
134
|
Properties: panelProperties
|
|
123
135
|
}
|
|
@@ -131,7 +143,8 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
131
143
|
config: configuration,
|
|
132
144
|
onChange: onModelChanged,
|
|
133
145
|
mathMlOptions: mathMlOptions,
|
|
134
|
-
rubricless: rubricless
|
|
146
|
+
rubricless: rubricless,
|
|
147
|
+
pluginOpts: baseInputConfiguration
|
|
135
148
|
})));
|
|
136
149
|
}
|
|
137
150
|
}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","styles","theme","design","fontFamily","fontSize","typography","Main","m","config","rubricless","points","sampleAnswers","rest","props","model","configuration","onConfigurationChanged","onModelChanged","contentDimensions","settingsPanelDisabled","showExcludeZero","showMaxPoint","mathMlOptions","rubriclessInstruction","width","value","verifyRubriclessModel","panelProperties","excludeZeroEnabled","label","maxPointsEnabled","rubriclessInstructionEnabled","Properties","maxWidth","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","styles","theme","design","fontFamily","fontSize","typography","Main","m","config","rubricless","points","sampleAnswers","rest","props","model","configuration","onConfigurationChanged","onModelChanged","baseInputConfiguration","contentDimensions","settingsPanelDisabled","showExcludeZero","showMaxPoint","mathMlOptions","rubriclessInstruction","width","value","verifyRubriclessModel","panelProperties","excludeZeroEnabled","label","maxPointsEnabled","rubriclessInstructionEnabled","getPluginProps","Object","assign","inputConfiguration","Properties","maxWidth","React","Component"],"mappings":"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","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 verifyRubriclessModel = (m, config) => {\n const { rubricless = false } = config || {};\n return rubricless ? (({ points, sampleAnswers, ...rest }) => rest)(m) : m;\n };\n\n render() {\n const { model, configuration, onConfigurationChanged, onModelChanged } = this.props || {};\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n settingsPanelDisabled,\n showExcludeZero = {},\n showMaxPoint = {},\n mathMlOptions = {},\n rubricless = false,\n rubriclessInstruction,\n width,\n } = configuration || {};\n\n // ensure to eliminate points and sampleAnswers in case of rubricless\n const value = this.verifyRubriclessModel(model, configuration);\n\n const panelProperties = {\n excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),\n maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),\n rubriclessInstructionEnabled: rubricless && rubriclessInstruction.settings && toggle(rubriclessInstruction.label),\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\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 pluginOpts={getPluginProps(rubriclessInstruction?.inputConfiguration)}\n groups={{\n Properties: panelProperties,\n }}\n />\n }\n >\n <div style={{ maxWidth: width }}>\n <Authoring\n value={value}\n config={configuration}\n onChange={onModelChanged}\n mathMlOptions={mathMlOptions}\n rubricless={rubricless}\n pluginOpts={baseInputConfiguration}\n />\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles(styles)(Main);\n"],"file":"main.js"}
|
package/configure/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.5.0",
|
|
5
5
|
"description": "Rubric authoring view",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"author": "Pie Framework Authors",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@material-ui/core": "^3.9.2",
|
|
10
10
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
11
|
-
"@pie-lib/pie-toolbox": "1.
|
|
11
|
+
"@pie-lib/pie-toolbox": "1.11.1",
|
|
12
12
|
"debug": "^4.1.1",
|
|
13
13
|
"react": "^16.8.6",
|
|
14
14
|
"react-dom": "^16.8.6"
|
|
@@ -8,6 +8,18 @@ export default {
|
|
|
8
8
|
maxPointsEnabled: true,
|
|
9
9
|
},
|
|
10
10
|
configuration: {
|
|
11
|
+
baseInputConfiguration: {
|
|
12
|
+
audio: { disabled: false },
|
|
13
|
+
video: { disabled: false },
|
|
14
|
+
image: { disabled: false },
|
|
15
|
+
},
|
|
16
|
+
rubriclessInstruction: {
|
|
17
|
+
inputConfiguration: {
|
|
18
|
+
audio: { disabled: false },
|
|
19
|
+
video: { disabled: false },
|
|
20
|
+
image: { disabled: false },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
11
23
|
showExcludeZero: {
|
|
12
24
|
settings: true,
|
|
13
25
|
label: 'Ability to exclude zero',
|
package/configure/src/main.jsx
CHANGED
|
@@ -13,7 +13,6 @@ const styles = (theme) => ({
|
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
class Main extends React.Component {
|
|
16
|
-
|
|
17
16
|
verifyRubriclessModel = (m, config) => {
|
|
18
17
|
const { rubricless = false } = config || {};
|
|
19
18
|
return rubricless ? (({ points, sampleAnswers, ...rest }) => rest)(m) : m;
|
|
@@ -22,6 +21,7 @@ class Main extends React.Component {
|
|
|
22
21
|
render() {
|
|
23
22
|
const { model, configuration, onConfigurationChanged, onModelChanged } = this.props || {};
|
|
24
23
|
const {
|
|
24
|
+
baseInputConfiguration = {},
|
|
25
25
|
contentDimensions = {},
|
|
26
26
|
settingsPanelDisabled,
|
|
27
27
|
showExcludeZero = {},
|
|
@@ -41,6 +41,15 @@ class Main extends React.Component {
|
|
|
41
41
|
rubriclessInstructionEnabled: rubricless && rubriclessInstruction.settings && toggle(rubriclessInstruction.label),
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
const getPluginProps = (props) => {
|
|
45
|
+
return Object.assign(
|
|
46
|
+
{
|
|
47
|
+
...baseInputConfiguration,
|
|
48
|
+
},
|
|
49
|
+
props || {},
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
44
53
|
return (
|
|
45
54
|
<layout.ConfigLayout
|
|
46
55
|
dimensions={contentDimensions}
|
|
@@ -51,6 +60,7 @@ class Main extends React.Component {
|
|
|
51
60
|
onChangeModel={onModelChanged}
|
|
52
61
|
configuration={configuration}
|
|
53
62
|
onChangeConfiguration={onConfigurationChanged}
|
|
63
|
+
pluginOpts={getPluginProps(rubriclessInstruction?.inputConfiguration)}
|
|
54
64
|
groups={{
|
|
55
65
|
Properties: panelProperties,
|
|
56
66
|
}}
|
|
@@ -58,7 +68,14 @@ class Main extends React.Component {
|
|
|
58
68
|
}
|
|
59
69
|
>
|
|
60
70
|
<div style={{ maxWidth: width }}>
|
|
61
|
-
<Authoring
|
|
71
|
+
<Authoring
|
|
72
|
+
value={value}
|
|
73
|
+
config={configuration}
|
|
74
|
+
onChange={onModelChanged}
|
|
75
|
+
mathMlOptions={mathMlOptions}
|
|
76
|
+
rubricless={rubricless}
|
|
77
|
+
pluginOpts={baseInputConfiguration}
|
|
78
|
+
/>
|
|
62
79
|
</div>
|
|
63
80
|
</layout.ConfigLayout>
|
|
64
81
|
);
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-controller@2.4.0...@pie-element/rubric-controller@2.5.0) (2024-03-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* updated pie-lib/pie-toolbox SC-28500 ([a8e4e6a](https://github.com/pie-framework/pie-elements/commit/a8e4e6ab27584435ce7ac3e964ccac2747402777))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* updated pie-lib/pie-toolbox SC-27890 and reverted once again math-rendering-accessible ([fd312e1](https://github.com/pie-framework/pie-elements/commit/fd312e1336999893025231946649496d290883e4))
|
|
17
|
+
* use math-rendering-accessible everywhere PD-1870 ([d52e660](https://github.com/pie-framework/pie-elements/commit/d52e6607ad8847d704bd9cb9b7e3107c130f0500))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
# [2.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-controller@2.3.2...@pie-element/rubric-controller@2.4.0) (2024-03-15)
|
|
7
24
|
|
|
8
25
|
|
package/controller/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric-controller",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "./node_modules/.bin/jest"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@pie-lib/pie-toolbox": "1.
|
|
10
|
+
"@pie-lib/pie-toolbox": "1.11.1",
|
|
11
11
|
"lodash": "^4.17.15"
|
|
12
12
|
}
|
|
13
13
|
}
|
package/docs/config-schema.json
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "object",
|
|
3
3
|
"properties": {
|
|
4
|
+
"baseInputConfiguration": {
|
|
5
|
+
"title": "EditableHtmlConfigureProp",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"math": {
|
|
9
|
+
"title": "EditableHtmlButtonConfigure",
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"disabled": {
|
|
13
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
14
|
+
"type": "boolean",
|
|
15
|
+
"title": "disabled"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"audio": {
|
|
20
|
+
"title": "EditableHtmlButtonConfigure",
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"disabled": {
|
|
24
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"title": "disabled"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"video": {
|
|
31
|
+
"title": "EditableHtmlButtonConfigure",
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"disabled": {
|
|
35
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"title": "disabled"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"image": {
|
|
42
|
+
"title": "EditableHtmlButtonConfigure",
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"disabled": {
|
|
46
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"title": "disabled"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
4
54
|
"settingsPanelDisabled": {
|
|
5
55
|
"description": "Indicates if the settings panel is not available",
|
|
6
56
|
"type": "boolean",
|
|
@@ -128,6 +178,67 @@
|
|
|
128
178
|
}
|
|
129
179
|
},
|
|
130
180
|
"definitions": {
|
|
181
|
+
"EditableHtmlConfigureProp": {
|
|
182
|
+
"title": "EditableHtmlConfigureProp",
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"math": {
|
|
186
|
+
"title": "EditableHtmlButtonConfigure",
|
|
187
|
+
"type": "object",
|
|
188
|
+
"properties": {
|
|
189
|
+
"disabled": {
|
|
190
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
191
|
+
"type": "boolean",
|
|
192
|
+
"title": "disabled"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"audio": {
|
|
197
|
+
"title": "EditableHtmlButtonConfigure",
|
|
198
|
+
"type": "object",
|
|
199
|
+
"properties": {
|
|
200
|
+
"disabled": {
|
|
201
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
202
|
+
"type": "boolean",
|
|
203
|
+
"title": "disabled"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"video": {
|
|
208
|
+
"title": "EditableHtmlButtonConfigure",
|
|
209
|
+
"type": "object",
|
|
210
|
+
"properties": {
|
|
211
|
+
"disabled": {
|
|
212
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"title": "disabled"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"image": {
|
|
219
|
+
"title": "EditableHtmlButtonConfigure",
|
|
220
|
+
"type": "object",
|
|
221
|
+
"properties": {
|
|
222
|
+
"disabled": {
|
|
223
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
224
|
+
"type": "boolean",
|
|
225
|
+
"title": "disabled"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"EditableHtmlButtonConfigure": {
|
|
232
|
+
"title": "EditableHtmlButtonConfigure",
|
|
233
|
+
"type": "object",
|
|
234
|
+
"properties": {
|
|
235
|
+
"disabled": {
|
|
236
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
237
|
+
"type": "boolean",
|
|
238
|
+
"title": "disabled"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
131
242
|
"ConfigureProp": {
|
|
132
243
|
"title": "ConfigureProp",
|
|
133
244
|
"type": "object",
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
The schema defines the following properties:
|
|
2
2
|
|
|
3
|
+
# `baseInputConfiguration` (object)
|
|
4
|
+
|
|
5
|
+
Properties of the `baseInputConfiguration` object:
|
|
6
|
+
|
|
7
|
+
## `math` (object)
|
|
8
|
+
|
|
9
|
+
Properties of the `math` object:
|
|
10
|
+
|
|
11
|
+
### `disabled` (boolean)
|
|
12
|
+
|
|
13
|
+
Indicates if the plugin is disabled or not
|
|
14
|
+
|
|
15
|
+
## `audio` (object)
|
|
16
|
+
|
|
17
|
+
Properties of the `audio` object:
|
|
18
|
+
|
|
19
|
+
### `disabled` (boolean)
|
|
20
|
+
|
|
21
|
+
Indicates if the plugin is disabled or not
|
|
22
|
+
|
|
23
|
+
## `video` (object)
|
|
24
|
+
|
|
25
|
+
Properties of the `video` object:
|
|
26
|
+
|
|
27
|
+
### `disabled` (boolean)
|
|
28
|
+
|
|
29
|
+
Indicates if the plugin is disabled or not
|
|
30
|
+
|
|
31
|
+
## `image` (object)
|
|
32
|
+
|
|
33
|
+
Properties of the `image` object:
|
|
34
|
+
|
|
35
|
+
### `disabled` (boolean)
|
|
36
|
+
|
|
37
|
+
Indicates if the plugin is disabled or not
|
|
38
|
+
|
|
3
39
|
# `settingsPanelDisabled` (boolean)
|
|
4
40
|
|
|
5
41
|
Indicates if the settings panel is not available
|
|
@@ -106,6 +142,50 @@ Default: `true`
|
|
|
106
142
|
|
|
107
143
|
The schema defines the following additional types:
|
|
108
144
|
|
|
145
|
+
## `EditableHtmlConfigureProp` (object)
|
|
146
|
+
|
|
147
|
+
Properties of the `EditableHtmlConfigureProp` object:
|
|
148
|
+
|
|
149
|
+
### `math` (object)
|
|
150
|
+
|
|
151
|
+
Properties of the `math` object:
|
|
152
|
+
|
|
153
|
+
#### `disabled` (boolean)
|
|
154
|
+
|
|
155
|
+
Indicates if the plugin is disabled or not
|
|
156
|
+
|
|
157
|
+
### `audio` (object)
|
|
158
|
+
|
|
159
|
+
Properties of the `audio` object:
|
|
160
|
+
|
|
161
|
+
#### `disabled` (boolean)
|
|
162
|
+
|
|
163
|
+
Indicates if the plugin is disabled or not
|
|
164
|
+
|
|
165
|
+
### `video` (object)
|
|
166
|
+
|
|
167
|
+
Properties of the `video` object:
|
|
168
|
+
|
|
169
|
+
#### `disabled` (boolean)
|
|
170
|
+
|
|
171
|
+
Indicates if the plugin is disabled or not
|
|
172
|
+
|
|
173
|
+
### `image` (object)
|
|
174
|
+
|
|
175
|
+
Properties of the `image` object:
|
|
176
|
+
|
|
177
|
+
#### `disabled` (boolean)
|
|
178
|
+
|
|
179
|
+
Indicates if the plugin is disabled or not
|
|
180
|
+
|
|
181
|
+
## `EditableHtmlButtonConfigure` (object)
|
|
182
|
+
|
|
183
|
+
Properties of the `EditableHtmlButtonConfigure` object:
|
|
184
|
+
|
|
185
|
+
### `disabled` (boolean)
|
|
186
|
+
|
|
187
|
+
Indicates if the plugin is disabled or not
|
|
188
|
+
|
|
109
189
|
## `ConfigureProp` (object)
|
|
110
190
|
|
|
111
191
|
Properties of the `ConfigureProp` object:
|
package/docs/pie-schema.json
CHANGED
|
@@ -59,6 +59,67 @@
|
|
|
59
59
|
"id"
|
|
60
60
|
],
|
|
61
61
|
"definitions": {
|
|
62
|
+
"EditableHtmlConfigureProp": {
|
|
63
|
+
"title": "EditableHtmlConfigureProp",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"math": {
|
|
67
|
+
"title": "EditableHtmlButtonConfigure",
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"disabled": {
|
|
71
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"title": "disabled"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"audio": {
|
|
78
|
+
"title": "EditableHtmlButtonConfigure",
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"disabled": {
|
|
82
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"title": "disabled"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"video": {
|
|
89
|
+
"title": "EditableHtmlButtonConfigure",
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"disabled": {
|
|
93
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"title": "disabled"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"image": {
|
|
100
|
+
"title": "EditableHtmlButtonConfigure",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"disabled": {
|
|
104
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"title": "disabled"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"EditableHtmlButtonConfigure": {
|
|
113
|
+
"title": "EditableHtmlButtonConfigure",
|
|
114
|
+
"type": "object",
|
|
115
|
+
"properties": {
|
|
116
|
+
"disabled": {
|
|
117
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
118
|
+
"type": "boolean",
|
|
119
|
+
"title": "disabled"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
62
123
|
"ConfigureProp": {
|
|
63
124
|
"title": "ConfigureProp",
|
|
64
125
|
"type": "object",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -40,6 +40,50 @@ The html Element tag name
|
|
|
40
40
|
|
|
41
41
|
The schema defines the following additional types:
|
|
42
42
|
|
|
43
|
+
## `EditableHtmlConfigureProp` (object)
|
|
44
|
+
|
|
45
|
+
Properties of the `EditableHtmlConfigureProp` object:
|
|
46
|
+
|
|
47
|
+
### `math` (object)
|
|
48
|
+
|
|
49
|
+
Properties of the `math` object:
|
|
50
|
+
|
|
51
|
+
#### `disabled` (boolean)
|
|
52
|
+
|
|
53
|
+
Indicates if the plugin is disabled or not
|
|
54
|
+
|
|
55
|
+
### `audio` (object)
|
|
56
|
+
|
|
57
|
+
Properties of the `audio` object:
|
|
58
|
+
|
|
59
|
+
#### `disabled` (boolean)
|
|
60
|
+
|
|
61
|
+
Indicates if the plugin is disabled or not
|
|
62
|
+
|
|
63
|
+
### `video` (object)
|
|
64
|
+
|
|
65
|
+
Properties of the `video` object:
|
|
66
|
+
|
|
67
|
+
#### `disabled` (boolean)
|
|
68
|
+
|
|
69
|
+
Indicates if the plugin is disabled or not
|
|
70
|
+
|
|
71
|
+
### `image` (object)
|
|
72
|
+
|
|
73
|
+
Properties of the `image` object:
|
|
74
|
+
|
|
75
|
+
#### `disabled` (boolean)
|
|
76
|
+
|
|
77
|
+
Indicates if the plugin is disabled or not
|
|
78
|
+
|
|
79
|
+
## `EditableHtmlButtonConfigure` (object)
|
|
80
|
+
|
|
81
|
+
Properties of the `EditableHtmlButtonConfigure` object:
|
|
82
|
+
|
|
83
|
+
### `disabled` (boolean)
|
|
84
|
+
|
|
85
|
+
Indicates if the plugin is disabled or not
|
|
86
|
+
|
|
43
87
|
## `ConfigureProp` (object)
|
|
44
88
|
|
|
45
89
|
Properties of the `ConfigureProp` object:
|
package/module/configure.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.4.0/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@4.0.0/module/index.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -127821,7 +127821,7 @@ const {isEqual: require$$12$f} = _dll_lodash;
|
|
|
127821
127821
|
if (tagName === 'math' || el.dataset && el.dataset.type === 'mathml' || hasMathChild) {
|
|
127822
127822
|
var newHtml = hasMathChild ? el.innerHTML : el.outerHTML;
|
|
127823
127823
|
if (MathPlugin.mathMlOptions.mmlEditing) {
|
|
127824
|
-
var htmlWithRemovedSpaces = newHtml.replaceAll(
|
|
127824
|
+
var htmlWithRemovedSpaces = newHtml.replaceAll(' ', ' ');
|
|
127825
127825
|
var htmlToUse = (0, _mathRendering.mmlToLatex)(htmlWithRemovedSpaces);
|
|
127826
127826
|
var latex = htmlDecode(htmlToUse);
|
|
127827
127827
|
var correctedLatex = fixLatexExpression(latex);
|
|
@@ -229394,7 +229394,7 @@ const require$$28 = _dll_debug;
|
|
|
229394
229394
|
}
|
|
229395
229395
|
};
|
|
229396
229396
|
})(function (props) {
|
|
229397
|
-
var points = props.points, content = props.content, classes = props.classes, sampleAnswer = props.sampleAnswer, _props$mathMlOptions = props.mathMlOptions, mathMlOptions = _props$mathMlOptions === void 0 ? {} : _props$mathMlOptions, error = props.error;
|
|
229397
|
+
var points = props.points, content = props.content, classes = props.classes, sampleAnswer = props.sampleAnswer, _props$mathMlOptions = props.mathMlOptions, mathMlOptions = _props$mathMlOptions === void 0 ? {} : _props$mathMlOptions, error = props.error, _props$pluginOpts = props.pluginOpts, pluginOpts = _props$pluginOpts === void 0 ? {} : _props$pluginOpts;
|
|
229398
229398
|
var pointsLabel = ("").concat(points, " ").concat(points <= 1 ? 'pt' : 'pts');
|
|
229399
229399
|
var showSampleAnswer = checkSampleAnswer(sampleAnswer);
|
|
229400
229400
|
return _react["default"].createElement("div", {
|
|
@@ -229409,6 +229409,7 @@ const require$$28 = _dll_debug;
|
|
|
229409
229409
|
}), _react["default"].createElement(_editableHtml["default"], {
|
|
229410
229410
|
className: classes.editor,
|
|
229411
229411
|
error: error,
|
|
229412
|
+
pluginProps: pluginOpts,
|
|
229412
229413
|
markup: content,
|
|
229413
229414
|
onChange: props.onChange,
|
|
229414
229415
|
mathMlOptions: mathMlOptions
|
|
@@ -229428,6 +229429,7 @@ const require$$28 = _dll_debug;
|
|
|
229428
229429
|
}, "Sample Response"), _react["default"].createElement(_editableHtml["default"], {
|
|
229429
229430
|
className: classes.editor,
|
|
229430
229431
|
markup: sampleAnswer,
|
|
229432
|
+
pluginProps: pluginOpts,
|
|
229431
229433
|
onChange: props.onSampleChange,
|
|
229432
229434
|
mathMlOptions: mathMlOptions
|
|
229433
229435
|
})));
|
|
@@ -229537,7 +229539,7 @@ const require$$28 = _dll_debug;
|
|
|
229537
229539
|
key: "render",
|
|
229538
229540
|
value: function render() {
|
|
229539
229541
|
var _this2 = this;
|
|
229540
|
-
var _this$props6 = this.props, classes = _this$props6.classes, className = _this$props6.className, value = _this$props6.value, _this$props6$mathMlOp = _this$props6.mathMlOptions, mathMlOptions = _this$props6$mathMlOp === void 0 ? {} : _this$props6$mathMlOp, _this$props6$config = _this$props6.config, config = _this$props6$config === void 0 ? {} : _this$props6$config, _this$props6$rubricle = _this$props6.rubricless, rubricless = _this$props6$rubricle === void 0 ? false : _this$props6$rubricle;
|
|
229542
|
+
var _this$props6 = this.props, classes = _this$props6.classes, className = _this$props6.className, value = _this$props6.value, _this$props6$mathMlOp = _this$props6.mathMlOptions, mathMlOptions = _this$props6$mathMlOp === void 0 ? {} : _this$props6$mathMlOp, _this$props6$config = _this$props6.config, config = _this$props6$config === void 0 ? {} : _this$props6$config, _this$props6$rubricle = _this$props6.rubricless, rubricless = _this$props6$rubricle === void 0 ? false : _this$props6$rubricle, _this$props6$pluginOp = _this$props6.pluginOpts, pluginOpts = _this$props6$pluginOp === void 0 ? {} : _this$props6$pluginOp;
|
|
229541
229543
|
var _ref = value || ({}), _ref$excludeZeroEnabl = _ref.excludeZeroEnabled, excludeZeroEnabled = _ref$excludeZeroEnabl === void 0 ? true : _ref$excludeZeroEnabl, _ref$maxPointsEnabled = _ref.maxPointsEnabled, maxPointsEnabled = _ref$maxPointsEnabled === void 0 ? true : _ref$maxPointsEnabled, _ref$errors = _ref.errors, errors = _ref$errors === void 0 ? {} : _ref$errors, _ref$rubriclessInstru = _ref.rubriclessInstructionEnabled, rubriclessInstructionEnabled = _ref$rubriclessInstru === void 0 ? false : _ref$rubriclessInstru, _ref$maxPoints = _ref.maxPoints, maxPoints = _ref$maxPoints === void 0 ? 10 : _ref$maxPoints;
|
|
229542
229544
|
var _ref2 = config || ({}), _ref2$rubriclessInstr = _ref2.rubriclessInstruction, rubriclessInstruction = _ref2$rubriclessInstr === void 0 ? {} : _ref2$rubriclessInstr, _ref2$maxMaxPoints = _ref2.maxMaxPoints, maxMaxPoints = _ref2$maxMaxPoints === void 0 ? 10 : _ref2$maxMaxPoints;
|
|
229543
229545
|
var _ref3 = errors || ({}), pointsDescriptorsErrors = _ref3.pointsDescriptorsErrors;
|
|
@@ -229555,7 +229557,8 @@ const require$$28 = _dll_debug;
|
|
|
229555
229557
|
}, maxPointsEnabled && _react["default"].createElement(MaxPoints, {
|
|
229556
229558
|
max: maxMaxPoints < 100 ? maxMaxPoints : 100,
|
|
229557
229559
|
value: maxPointsValue,
|
|
229558
|
-
onChange: this.changeMaxPoints
|
|
229560
|
+
onChange: this.changeMaxPoints,
|
|
229561
|
+
pluginOpts: pluginOpts
|
|
229559
229562
|
}), excludeZeroEnabled && _react["default"].createElement(_FormControlLabel["default"], {
|
|
229560
229563
|
label: "Exclude zeros",
|
|
229561
229564
|
control: _react["default"].createElement(_Checkbox["default"], {
|
|
@@ -229569,6 +229572,7 @@ const require$$28 = _dll_debug;
|
|
|
229569
229572
|
className: classes.input,
|
|
229570
229573
|
markup: value.rubriclessInstruction || '',
|
|
229571
229574
|
onChange: this.changeRubriclessInstruction,
|
|
229575
|
+
pluginProps: pluginOpts,
|
|
229572
229576
|
nonEmpty: false,
|
|
229573
229577
|
disableUnderline: true,
|
|
229574
229578
|
languageCharactersProps: [{
|
|
@@ -229609,7 +229613,8 @@ const require$$28 = _dll_debug;
|
|
|
229609
229613
|
onMenuChange: function onMenuChange(clickedItem) {
|
|
229610
229614
|
return _this2.onPointMenuChange(index, clickedItem);
|
|
229611
229615
|
},
|
|
229612
|
-
mathMlOptions: mathMlOptions
|
|
229616
|
+
mathMlOptions: mathMlOptions,
|
|
229617
|
+
pluginOpts: pluginOpts
|
|
229613
229618
|
}));
|
|
229614
229619
|
});
|
|
229615
229620
|
}), provided.placeholder);
|
|
@@ -229624,6 +229629,7 @@ const require$$28 = _dll_debug;
|
|
|
229624
229629
|
className: _propTypes["default"].string,
|
|
229625
229630
|
value: RubricType,
|
|
229626
229631
|
config: _propTypes["default"].object,
|
|
229632
|
+
pluginOpts: _propTypes["default"].object,
|
|
229627
229633
|
rubricless: _propTypes["default"].bool,
|
|
229628
229634
|
onChange: _propTypes["default"].func
|
|
229629
229635
|
});
|
|
@@ -229658,7 +229664,7 @@ const require$$28 = _dll_debug;
|
|
|
229658
229664
|
};
|
|
229659
229665
|
var StyledRawAuthoring = (0, _styles.withStyles)(styles)(RawAuthoring);
|
|
229660
229666
|
var Reverse = function Reverse(props) {
|
|
229661
|
-
var _ref4 = props || ({}), _ref4$rubricless = _ref4.rubricless, rubricless = _ref4$rubricless === void 0 ? false : _ref4$rubricless, _ref4$config = _ref4.config, config = _ref4$config === void 0 ? {} : _ref4$config;
|
|
229667
|
+
var _ref4 = props || ({}), _ref4$rubricless = _ref4.rubricless, rubricless = _ref4$rubricless === void 0 ? false : _ref4$rubricless, _ref4$config = _ref4.config, config = _ref4$config === void 0 ? {} : _ref4$config, _ref4$pluginOpts = _ref4.pluginOpts, pluginOpts = _ref4$pluginOpts === void 0 ? {} : _ref4$pluginOpts;
|
|
229662
229668
|
var points = Array.from(props.value.points || []).reverse();
|
|
229663
229669
|
var sampleAnswers = Array.from(props.value.sampleAnswers || []).reverse();
|
|
229664
229670
|
if (points.length > sampleAnswers.length) {
|
|
@@ -229680,12 +229686,14 @@ const require$$28 = _dll_debug;
|
|
|
229680
229686
|
value: value,
|
|
229681
229687
|
config: config,
|
|
229682
229688
|
onChange: onChange,
|
|
229683
|
-
rubricless: rubricless
|
|
229689
|
+
rubricless: rubricless,
|
|
229690
|
+
pluginOpts: pluginOpts
|
|
229684
229691
|
});
|
|
229685
229692
|
};
|
|
229686
229693
|
Reverse.propTypes = {
|
|
229687
229694
|
value: RubricType,
|
|
229688
229695
|
config: _propTypes["default"].object,
|
|
229696
|
+
pluginOpts: _propTypes["default"].object,
|
|
229689
229697
|
rubricless: _propTypes["default"].bool,
|
|
229690
229698
|
getIndex: _propTypes["default"].func,
|
|
229691
229699
|
onChange: _propTypes["default"].func
|
|
@@ -229755,6 +229763,27 @@ const require$$12$1 = _dll_pie_lib__pie_toolbox_config_ui;
|
|
|
229755
229763
|
var _styles = styles$1H;
|
|
229756
229764
|
var _configUi = require$$12$1;
|
|
229757
229765
|
var _excluded = ["points", "sampleAnswers"];
|
|
229766
|
+
function ownKeys(object, enumerableOnly) {
|
|
229767
|
+
var keys = Object.keys(object);
|
|
229768
|
+
if (Object.getOwnPropertySymbols) {
|
|
229769
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
229770
|
+
(enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
229771
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
229772
|
+
})), keys.push.apply(keys, symbols));
|
|
229773
|
+
}
|
|
229774
|
+
return keys;
|
|
229775
|
+
}
|
|
229776
|
+
function _objectSpread(target) {
|
|
229777
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
229778
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
229779
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
229780
|
+
(0, _defineProperty2["default"])(target, key, source[key]);
|
|
229781
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
229782
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
229783
|
+
});
|
|
229784
|
+
}
|
|
229785
|
+
return target;
|
|
229786
|
+
}
|
|
229758
229787
|
function _createSuper(Derived) {
|
|
229759
229788
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
229760
229789
|
return function _createSuperInternal() {
|
|
@@ -229813,13 +229842,16 @@ const require$$12$1 = _dll_pie_lib__pie_toolbox_config_ui;
|
|
|
229813
229842
|
key: "render",
|
|
229814
229843
|
value: function render() {
|
|
229815
229844
|
var _ref3 = this.props || ({}), model = _ref3.model, configuration = _ref3.configuration, onConfigurationChanged = _ref3.onConfigurationChanged, onModelChanged = _ref3.onModelChanged;
|
|
229816
|
-
var _ref4 = configuration || ({}), _ref4$contentDimensio = _ref4.contentDimensions, contentDimensions = _ref4$contentDimensio === void 0 ? {} : _ref4$contentDimensio, settingsPanelDisabled = _ref4.settingsPanelDisabled, _ref4$showExcludeZero = _ref4.showExcludeZero, showExcludeZero = _ref4$showExcludeZero === void 0 ? {} : _ref4$showExcludeZero, _ref4$showMaxPoint = _ref4.showMaxPoint, showMaxPoint = _ref4$showMaxPoint === void 0 ? {} : _ref4$showMaxPoint, _ref4$mathMlOptions = _ref4.mathMlOptions, mathMlOptions = _ref4$mathMlOptions === void 0 ? {} : _ref4$mathMlOptions, _ref4$rubricless = _ref4.rubricless, rubricless = _ref4$rubricless === void 0 ? false : _ref4$rubricless, rubriclessInstruction = _ref4.rubriclessInstruction, width = _ref4.width;
|
|
229845
|
+
var _ref4 = configuration || ({}), _ref4$baseInputConfig = _ref4.baseInputConfiguration, baseInputConfiguration = _ref4$baseInputConfig === void 0 ? {} : _ref4$baseInputConfig, _ref4$contentDimensio = _ref4.contentDimensions, contentDimensions = _ref4$contentDimensio === void 0 ? {} : _ref4$contentDimensio, settingsPanelDisabled = _ref4.settingsPanelDisabled, _ref4$showExcludeZero = _ref4.showExcludeZero, showExcludeZero = _ref4$showExcludeZero === void 0 ? {} : _ref4$showExcludeZero, _ref4$showMaxPoint = _ref4.showMaxPoint, showMaxPoint = _ref4$showMaxPoint === void 0 ? {} : _ref4$showMaxPoint, _ref4$mathMlOptions = _ref4.mathMlOptions, mathMlOptions = _ref4$mathMlOptions === void 0 ? {} : _ref4$mathMlOptions, _ref4$rubricless = _ref4.rubricless, rubricless = _ref4$rubricless === void 0 ? false : _ref4$rubricless, rubriclessInstruction = _ref4.rubriclessInstruction, width = _ref4.width;
|
|
229817
229846
|
var value = this.verifyRubriclessModel(model, configuration);
|
|
229818
229847
|
var panelProperties = {
|
|
229819
229848
|
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
229820
229849
|
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),
|
|
229821
229850
|
rubriclessInstructionEnabled: rubricless && rubriclessInstruction.settings && toggle(rubriclessInstruction.label)
|
|
229822
229851
|
};
|
|
229852
|
+
var getPluginProps = function getPluginProps(props) {
|
|
229853
|
+
return Object.assign(_objectSpread({}, baseInputConfiguration), props || ({}));
|
|
229854
|
+
};
|
|
229823
229855
|
return _react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
229824
229856
|
dimensions: contentDimensions,
|
|
229825
229857
|
hideSettings: settingsPanelDisabled,
|
|
@@ -229828,6 +229860,7 @@ const require$$12$1 = _dll_pie_lib__pie_toolbox_config_ui;
|
|
|
229828
229860
|
onChangeModel: onModelChanged,
|
|
229829
229861
|
configuration: configuration,
|
|
229830
229862
|
onChangeConfiguration: onConfigurationChanged,
|
|
229863
|
+
pluginOpts: getPluginProps(rubriclessInstruction === null || rubriclessInstruction === void 0 ? void 0 : rubriclessInstruction.inputConfiguration),
|
|
229831
229864
|
groups: {
|
|
229832
229865
|
Properties: panelProperties
|
|
229833
229866
|
}
|
|
@@ -229841,7 +229874,8 @@ const require$$12$1 = _dll_pie_lib__pie_toolbox_config_ui;
|
|
|
229841
229874
|
config: configuration,
|
|
229842
229875
|
onChange: onModelChanged,
|
|
229843
229876
|
mathMlOptions: mathMlOptions,
|
|
229844
|
-
rubricless: rubricless
|
|
229877
|
+
rubricless: rubricless,
|
|
229878
|
+
pluginOpts: baseInputConfiguration
|
|
229845
229879
|
})));
|
|
229846
229880
|
}
|
|
229847
229881
|
}]);
|
|
@@ -229867,6 +229901,30 @@ var defaults = {};
|
|
|
229867
229901
|
maxPointsEnabled: true
|
|
229868
229902
|
},
|
|
229869
229903
|
configuration: {
|
|
229904
|
+
baseInputConfiguration: {
|
|
229905
|
+
audio: {
|
|
229906
|
+
disabled: false
|
|
229907
|
+
},
|
|
229908
|
+
video: {
|
|
229909
|
+
disabled: false
|
|
229910
|
+
},
|
|
229911
|
+
image: {
|
|
229912
|
+
disabled: false
|
|
229913
|
+
}
|
|
229914
|
+
},
|
|
229915
|
+
rubriclessInstruction: {
|
|
229916
|
+
inputConfiguration: {
|
|
229917
|
+
audio: {
|
|
229918
|
+
disabled: false
|
|
229919
|
+
},
|
|
229920
|
+
video: {
|
|
229921
|
+
disabled: false
|
|
229922
|
+
},
|
|
229923
|
+
image: {
|
|
229924
|
+
disabled: false
|
|
229925
|
+
}
|
|
229926
|
+
}
|
|
229927
|
+
},
|
|
229870
229928
|
showExcludeZero: {
|
|
229871
229929
|
settings: true,
|
|
229872
229930
|
label: 'Ability to exclude zero'
|
package/module/element.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.4.0/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.0.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.4.0/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.0.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "src/index.js",
|
|
6
6
|
"description": "Rubric Scoring Interaction",
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@material-ui/core": "^3.9.2",
|
|
13
|
-
"@pie-lib/pie-toolbox": "1.
|
|
13
|
+
"@pie-lib/pie-toolbox": "1.11.1",
|
|
14
14
|
"prop-types": "^15.7.2"
|
|
15
15
|
},
|
|
16
16
|
"author": "pie framework developers",
|
|
17
17
|
"license": "ISC",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "229e10aa53659f55129b8a4e27dbfc76939e214b",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|