@pie-element/rubric 2.2.1-next.1 → 2.2.2-next.31
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 +11 -0
- package/configure/CHANGELOG.md +11 -0
- package/configure/lib/main.js +20 -16
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +1 -1
- package/configure/src/main.jsx +25 -25
- package/docs/config-schema.json +55 -0
- package/docs/config-schema.json.md +47 -1
- package/docs/pie-schema.json +18 -0
- package/docs/pie-schema.json.md +19 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@2.2.0...@pie-element/rubric@2.2.1) (2022-12-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* updated pie-libs ([8cb5b90](https://github.com/pie-framework/pie-elements/commit/8cb5b90d501ccbdf5ffd764e6555faa48b8f54d6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [2.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@2.1.4...@pie-element/rubric@2.2.0) (2022-12-20)
|
|
7
18
|
|
|
8
19
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@2.1.5...@pie-element/rubric-configure@2.1.6) (2022-12-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* updated pie-libs ([8cb5b90](https://github.com/pie-framework/pie-elements/commit/8cb5b90d501ccbdf5ffd764e6555faa48b8f54d6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@2.1.4...@pie-element/rubric-configure@2.1.5) (2022-12-20)
|
|
7
18
|
|
|
8
19
|
|
package/configure/lib/main.js
CHANGED
|
@@ -31,11 +31,14 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
31
31
|
|
|
32
32
|
var Panel = _configUi.settings.Panel,
|
|
33
33
|
toggle = _configUi.settings.toggle;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
|
|
35
|
+
var styles = function styles(theme) {
|
|
36
|
+
return {
|
|
37
|
+
design: {
|
|
38
|
+
fontFamily: 'Cerebri Sans',
|
|
39
|
+
fontSize: theme.typography.fontSize
|
|
40
|
+
}
|
|
41
|
+
};
|
|
39
42
|
};
|
|
40
43
|
|
|
41
44
|
var Main = /*#__PURE__*/function (_React$Component) {
|
|
@@ -60,25 +63,26 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
60
63
|
|
|
61
64
|
var _ref2 = configuration || {},
|
|
62
65
|
settingsPanelDisabled = _ref2.settingsPanelDisabled,
|
|
63
|
-
showExcludeZero = _ref2.showExcludeZero,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
_ref2$showExcludeZero = _ref2.showExcludeZero,
|
|
67
|
+
showExcludeZero = _ref2$showExcludeZero === void 0 ? {} : _ref2$showExcludeZero,
|
|
68
|
+
_ref2$showMaxPoint = _ref2.showMaxPoint,
|
|
69
|
+
showMaxPoint = _ref2$showMaxPoint === void 0 ? {} : _ref2$showMaxPoint;
|
|
70
|
+
|
|
71
|
+
var panelProperties = {
|
|
72
|
+
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
73
|
+
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label)
|
|
74
|
+
};
|
|
66
75
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
67
76
|
className: classes.design
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
onChange: onModelChanged
|
|
71
|
-
}) : /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
77
|
+
}, /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
78
|
+
hideSettings: settingsPanelDisabled,
|
|
72
79
|
settings: /*#__PURE__*/_react["default"].createElement(Panel, {
|
|
73
80
|
model: model,
|
|
74
81
|
onChangeModel: onModelChanged,
|
|
75
82
|
configuration: configuration,
|
|
76
83
|
onChangeConfiguration: onConfigurationChanged,
|
|
77
84
|
groups: {
|
|
78
|
-
Properties:
|
|
79
|
-
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
80
|
-
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label)
|
|
81
|
-
}
|
|
85
|
+
Properties: panelProperties
|
|
82
86
|
}
|
|
83
87
|
})
|
|
84
88
|
}, /*#__PURE__*/_react["default"].createElement(_rubric.Authoring, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","styles","design","fontFamily","fontSize","Main","props","model","classes","configuration","onConfigurationChanged","onModelChanged","settingsPanelDisabled","showExcludeZero","showMaxPoint","
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","styles","theme","design","fontFamily","fontSize","typography","Main","props","model","classes","configuration","onConfigurationChanged","onModelChanged","settingsPanelDisabled","showExcludeZero","showMaxPoint","panelProperties","excludeZeroEnabled","label","maxPointsEnabled","Properties","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA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,qBAAqB,EAAEC,sBAJzB;AAKE,UAAA,MAAM,EAAE;AACNS,YAAAA,UAAU,EAAEJ;AADN;AALV;AAHJ,sBAcE,gCAAC,iBAAD;AAAW,QAAA,KAAK,EAAER,KAAlB;AAAyB,QAAA,QAAQ,EAAEI;AAAnC,QAdF,CADF,CADF;AAoBD;;;EA9BgBS,kBAAMC,S;;eAiCV,wBAAWtB,MAAX,EAAmBM,IAAnB,C","sourcesContent":["import React from 'react';\nimport { Authoring } from '@pie-lib/rubric';\nimport { withStyles } from '@material-ui/core/styles';\nimport { layout, settings } from '@pie-lib/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, classes, configuration, onConfigurationChanged, onModelChanged } = this.props || {};\n const { settingsPanelDisabled, showExcludeZero = {}, showMaxPoint = {} } = configuration || {};\n\n const panelProperties = {\n excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),\n maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),\n };\n\n return (\n <div className={classes.design}>\n <layout.ConfigLayout\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 <Authoring value={model} onChange={onModelChanged} />\n </layout.ConfigLayout>\n </div>\n );\n }\n}\n\nexport default withStyles(styles)(Main);\n"],"file":"main.js"}
|
package/configure/package.json
CHANGED
package/configure/src/main.jsx
CHANGED
|
@@ -5,41 +5,41 @@ import { layout, settings } from '@pie-lib/config-ui';
|
|
|
5
5
|
|
|
6
6
|
const { Panel, toggle } = settings;
|
|
7
7
|
|
|
8
|
-
const styles = {
|
|
8
|
+
const styles = (theme) => ({
|
|
9
9
|
design: {
|
|
10
10
|
fontFamily: 'Cerebri Sans',
|
|
11
|
-
fontSize:
|
|
11
|
+
fontSize: theme.typography.fontSize,
|
|
12
12
|
},
|
|
13
|
-
};
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
class Main extends React.Component {
|
|
16
16
|
render() {
|
|
17
17
|
const { model, classes, configuration, onConfigurationChanged, onModelChanged } = this.props || {};
|
|
18
|
-
const { settingsPanelDisabled, showExcludeZero, showMaxPoint } = configuration || {};
|
|
18
|
+
const { settingsPanelDisabled, showExcludeZero = {}, showMaxPoint = {} } = configuration || {};
|
|
19
|
+
|
|
20
|
+
const panelProperties = {
|
|
21
|
+
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
22
|
+
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),
|
|
23
|
+
};
|
|
24
|
+
|
|
19
25
|
return (
|
|
20
26
|
<div className={classes.design}>
|
|
21
|
-
|
|
27
|
+
<layout.ConfigLayout
|
|
28
|
+
hideSettings={settingsPanelDisabled}
|
|
29
|
+
settings={
|
|
30
|
+
<Panel
|
|
31
|
+
model={model}
|
|
32
|
+
onChangeModel={onModelChanged}
|
|
33
|
+
configuration={configuration}
|
|
34
|
+
onChangeConfiguration={onConfigurationChanged}
|
|
35
|
+
groups={{
|
|
36
|
+
Properties: panelProperties,
|
|
37
|
+
}}
|
|
38
|
+
/>
|
|
39
|
+
}
|
|
40
|
+
>
|
|
22
41
|
<Authoring value={model} onChange={onModelChanged} />
|
|
23
|
-
|
|
24
|
-
<layout.ConfigLayout
|
|
25
|
-
settings={
|
|
26
|
-
<Panel
|
|
27
|
-
model={model}
|
|
28
|
-
onChangeModel={onModelChanged}
|
|
29
|
-
configuration={configuration}
|
|
30
|
-
onChangeConfiguration={onConfigurationChanged}
|
|
31
|
-
groups={{
|
|
32
|
-
Properties: {
|
|
33
|
-
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
34
|
-
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),
|
|
35
|
-
},
|
|
36
|
-
}}
|
|
37
|
-
/>
|
|
38
|
-
}
|
|
39
|
-
>
|
|
40
|
-
<Authoring value={model} onChange={onModelChanged} />
|
|
41
|
-
</layout.ConfigLayout>
|
|
42
|
-
)}
|
|
42
|
+
</layout.ConfigLayout>
|
|
43
43
|
</div>
|
|
44
44
|
);
|
|
45
45
|
}
|
package/docs/config-schema.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "object",
|
|
3
3
|
"properties": {
|
|
4
|
+
"settingsPanelDisabled": {
|
|
5
|
+
"description": "Indicates if the settings panel is not available",
|
|
6
|
+
"type": "boolean",
|
|
7
|
+
"title": "settingsPanelDisabled"
|
|
8
|
+
},
|
|
9
|
+
"showExcludeZero": {
|
|
10
|
+
"title": "ConfigureProp",
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"settings": {
|
|
14
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
15
|
+
"type": "boolean",
|
|
16
|
+
"title": "settings"
|
|
17
|
+
},
|
|
18
|
+
"label": {
|
|
19
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"title": "label"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"showMaxPoint": {
|
|
26
|
+
"title": "ConfigureProp",
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"settings": {
|
|
30
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"title": "settings"
|
|
33
|
+
},
|
|
34
|
+
"label": {
|
|
35
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"title": "label"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
4
41
|
"showPrompt": {
|
|
5
42
|
"description": "Determines whether prompt field will be displayed or not",
|
|
6
43
|
"default": true,
|
|
@@ -20,5 +57,23 @@
|
|
|
20
57
|
"title": "settingsPartialScoring"
|
|
21
58
|
}
|
|
22
59
|
},
|
|
60
|
+
"definitions": {
|
|
61
|
+
"ConfigureProp": {
|
|
62
|
+
"title": "ConfigureProp",
|
|
63
|
+
"type": "object",
|
|
64
|
+
"properties": {
|
|
65
|
+
"settings": {
|
|
66
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"title": "settings"
|
|
69
|
+
},
|
|
70
|
+
"label": {
|
|
71
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
72
|
+
"type": "string",
|
|
73
|
+
"title": "label"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
23
78
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
24
79
|
}
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
The schema defines the following properties:
|
|
2
2
|
|
|
3
|
+
# `settingsPanelDisabled` (boolean)
|
|
4
|
+
|
|
5
|
+
Indicates if the settings panel is not available
|
|
6
|
+
|
|
7
|
+
# `showExcludeZero` (object)
|
|
8
|
+
|
|
9
|
+
Properties of the `showExcludeZero` object:
|
|
10
|
+
|
|
11
|
+
## `settings` (boolean)
|
|
12
|
+
|
|
13
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
14
|
+
|
|
15
|
+
## `label` (string)
|
|
16
|
+
|
|
17
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
18
|
+
|
|
19
|
+
# `showMaxPoint` (object)
|
|
20
|
+
|
|
21
|
+
Properties of the `showMaxPoint` object:
|
|
22
|
+
|
|
23
|
+
## `settings` (boolean)
|
|
24
|
+
|
|
25
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
26
|
+
|
|
27
|
+
## `label` (string)
|
|
28
|
+
|
|
29
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
30
|
+
|
|
3
31
|
# `showPrompt` (boolean)
|
|
4
32
|
|
|
5
33
|
Determines whether prompt field will be displayed or not
|
|
@@ -16,4 +44,22 @@ Default: `"Item Stemm"`
|
|
|
16
44
|
|
|
17
45
|
Indicates whether the settings panel wil allow the author to modify settings for partial scoring
|
|
18
46
|
|
|
19
|
-
Default: `true`
|
|
47
|
+
Default: `true`
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
# Sub Schemas
|
|
52
|
+
|
|
53
|
+
The schema defines the following additional types:
|
|
54
|
+
|
|
55
|
+
## `ConfigureProp` (object)
|
|
56
|
+
|
|
57
|
+
Properties of the `ConfigureProp` object:
|
|
58
|
+
|
|
59
|
+
### `settings` (boolean)
|
|
60
|
+
|
|
61
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
62
|
+
|
|
63
|
+
### `label` (string)
|
|
64
|
+
|
|
65
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
package/docs/pie-schema.json
CHANGED
|
@@ -58,5 +58,23 @@
|
|
|
58
58
|
"element",
|
|
59
59
|
"id"
|
|
60
60
|
],
|
|
61
|
+
"definitions": {
|
|
62
|
+
"ConfigureProp": {
|
|
63
|
+
"title": "ConfigureProp",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"settings": {
|
|
67
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"title": "settings"
|
|
70
|
+
},
|
|
71
|
+
"label": {
|
|
72
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"title": "label"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
61
79
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
62
80
|
}
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -32,4 +32,22 @@ Identifier to identify the Pie Element in html markup, Must be unique within a p
|
|
|
32
32
|
|
|
33
33
|
# `element` (string, required)
|
|
34
34
|
|
|
35
|
-
The html Element tag name
|
|
35
|
+
The html Element tag name
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
# Sub Schemas
|
|
40
|
+
|
|
41
|
+
The schema defines the following additional types:
|
|
42
|
+
|
|
43
|
+
## `ConfigureProp` (object)
|
|
44
|
+
|
|
45
|
+
Properties of the `ConfigureProp` object:
|
|
46
|
+
|
|
47
|
+
### `settings` (boolean)
|
|
48
|
+
|
|
49
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
50
|
+
|
|
51
|
+
### `label` (string)
|
|
52
|
+
|
|
53
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2-next.31+80da0617c",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "src/index.js",
|
|
6
6
|
"description": "Rubric Scoring Interaction",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"author": "pie framework developers",
|
|
16
16
|
"license": "ISC",
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "80da0617ca8a9fe53b8b7cb8f64e635af84bf4be",
|
|
18
18
|
"scripts": {
|
|
19
19
|
"postpublish": "../../scripts/postpublish"
|
|
20
20
|
},
|