@pie-element/match-list 1.17.3-next.45 → 1.17.3-next.71
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/docs/config-schema.json +44 -0
- package/docs/config-schema.json.md +34 -0
- package/docs/demo/generate.js +0 -11
- package/lib/choices-list.js +2 -1
- package/lib/choices-list.js.map +1 -1
- package/lib/main.js +1 -1
- package/lib/main.js.map +1 -1
- package/package.json +4 -4
package/docs/config-schema.json
CHANGED
|
@@ -15,6 +15,50 @@
|
|
|
15
15
|
"type": "string",
|
|
16
16
|
"title": "promptLabel"
|
|
17
17
|
},
|
|
18
|
+
"contentDimensions": {
|
|
19
|
+
"description": "Indicates the dimensions configuration for the authoring container\nNote: Some items have a default minimum width because of their content, but if\nthe minWidth is lower than this, the overflow behavior will take care of that",
|
|
20
|
+
"default": ": {}",
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"maxHeight": {
|
|
24
|
+
"description": "Indicates the max height of the authoring container",
|
|
25
|
+
"default": "undefined",
|
|
26
|
+
"type": [
|
|
27
|
+
"string",
|
|
28
|
+
"number"
|
|
29
|
+
],
|
|
30
|
+
"title": "maxHeight"
|
|
31
|
+
},
|
|
32
|
+
"maxWidth": {
|
|
33
|
+
"description": "Indicates the max width of the authoring container",
|
|
34
|
+
"default": "undefined",
|
|
35
|
+
"type": [
|
|
36
|
+
"string",
|
|
37
|
+
"number"
|
|
38
|
+
],
|
|
39
|
+
"title": "maxWidth"
|
|
40
|
+
},
|
|
41
|
+
"minHeight": {
|
|
42
|
+
"description": "Indicates the min height of the authoring container",
|
|
43
|
+
"default": "undefined",
|
|
44
|
+
"type": [
|
|
45
|
+
"string",
|
|
46
|
+
"number"
|
|
47
|
+
],
|
|
48
|
+
"title": "minHeight"
|
|
49
|
+
},
|
|
50
|
+
"minWidth": {
|
|
51
|
+
"description": "Indicates the min width of the authoring container",
|
|
52
|
+
"default": "undefined",
|
|
53
|
+
"type": [
|
|
54
|
+
"string",
|
|
55
|
+
"number"
|
|
56
|
+
],
|
|
57
|
+
"title": "minWidth"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"title": "contentDimensions"
|
|
61
|
+
},
|
|
18
62
|
"settingsPartialScoring": {
|
|
19
63
|
"description": "Indicates whether the settings panel wil allow the author to modify settings for partial scoring",
|
|
20
64
|
"default": true,
|
|
@@ -14,6 +14,40 @@ The label for the item stem/prompt field
|
|
|
14
14
|
|
|
15
15
|
Default: `"Item Stemm"`
|
|
16
16
|
|
|
17
|
+
# `contentDimensions` (object)
|
|
18
|
+
|
|
19
|
+
Indicates the dimensions configuration for the authoring container
|
|
20
|
+
Note: Some items have a default minimum width because of their content, but if
|
|
21
|
+
the minWidth is lower than this, the overflow behavior will take care of that
|
|
22
|
+
|
|
23
|
+
Properties of the `contentDimensions` object:
|
|
24
|
+
|
|
25
|
+
## `maxHeight` (string,number)
|
|
26
|
+
|
|
27
|
+
Indicates the max height of the authoring container
|
|
28
|
+
|
|
29
|
+
Default: `"undefined"`
|
|
30
|
+
|
|
31
|
+
## `maxWidth` (string,number)
|
|
32
|
+
|
|
33
|
+
Indicates the max width of the authoring container
|
|
34
|
+
|
|
35
|
+
Default: `"undefined"`
|
|
36
|
+
|
|
37
|
+
## `minHeight` (string,number)
|
|
38
|
+
|
|
39
|
+
Indicates the min height of the authoring container
|
|
40
|
+
|
|
41
|
+
Default: `"undefined"`
|
|
42
|
+
|
|
43
|
+
## `minWidth` (string,number)
|
|
44
|
+
|
|
45
|
+
Indicates the min width of the authoring container
|
|
46
|
+
|
|
47
|
+
Default: `"undefined"`
|
|
48
|
+
|
|
49
|
+
Default: `": {}"`
|
|
50
|
+
|
|
17
51
|
# `settingsPartialScoring` (boolean)
|
|
18
52
|
|
|
19
53
|
Indicates whether the settings panel wil allow the author to modify settings for partial scoring
|
package/docs/demo/generate.js
CHANGED
package/lib/choices-list.js
CHANGED
|
@@ -97,7 +97,8 @@ exports.ChoicesList = ChoicesList;
|
|
|
97
97
|
session: _propTypes["default"].object.isRequired,
|
|
98
98
|
instanceId: _propTypes["default"].string.isRequired,
|
|
99
99
|
model: _propTypes["default"].object.isRequired,
|
|
100
|
-
disabled: _propTypes["default"].bool.isRequired
|
|
100
|
+
disabled: _propTypes["default"].bool.isRequired,
|
|
101
|
+
onRemoveAnswer: _propTypes["default"].func
|
|
101
102
|
});
|
|
102
103
|
|
|
103
104
|
var styles = function styles(theme) {
|
package/lib/choices-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/choices-list.jsx"],"names":["ChoicesList","props","model","classes","disabled","session","instanceId","onRemoveAnswer","config","duplicates","filteredAnswers","answers","filter","answer","value","val","id","map","choice","choicesContainer","MatchDroppablePlaceholder","answersContainer","React","Component","PropTypes","object","isRequired","string","bool","styles","theme","marginBottom","spacing","unit","alignItems","display","flexDirection","flexWrap","justifyContent","marginTop","minHeight","minWidth","height","margin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,W;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../src/choices-list.jsx"],"names":["ChoicesList","props","model","classes","disabled","session","instanceId","onRemoveAnswer","config","duplicates","filteredAnswers","answers","filter","answer","value","val","id","map","choice","choicesContainer","MatchDroppablePlaceholder","answersContainer","React","Component","PropTypes","object","isRequired","string","bool","func","styles","theme","marginBottom","spacing","unit","alignItems","display","flexDirection","flexWrap","justifyContent","marginTop","minHeight","minWidth","height","margin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,W;;;;;;;;;;;;WAUX,kBAAS;AACP,wBAA0E,KAAKC,KAA/E;AAAA,UAAQC,KAAR,eAAQA,KAAR;AAAA,UAAeC,OAAf,eAAeA,OAAf;AAAA,UAAwBC,QAAxB,eAAwBA,QA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AiBC,UAFT;AAGjBpB,EAAAA,UAAU,EAAEkB,sBAAUG,MAAV,CAAiBD,UAHZ;AAIjBxB,EAAAA,KAAK,EAAEsB,sBAAUC,MAAV,CAAiBC,UAJP;AAKjBtB,EAAAA,QAAQ,EAAEoB,sBAAUI,IAAV,CAAeF,UALR;AAMjBnB,EAAAA,cAAc,EAAEiB,sBAAUK;AANT,C;;AAiDrB,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBZ,IAAAA,gBAAgB,EAAE;AAChBa,MAAAA,YAAY,EAAED,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB;AADnB,KADO;AAIzBb,IAAAA,gBAAgB,EAAE;AAChBc,MAAAA,UAAU,EAAE,QADI;AAEhBC,MAAAA,OAAO,EAAE,MAFO;AAGhBC,MAAAA,aAAa,EAAE,KAHC;AAIhBC,MAAAA,QAAQ,EAAE,MAJM;AAKhBC,MAAAA,cAAc,EAAE,eALA;AAMhBC,MAAAA,SAAS,EAAET,KAAK,CAACE,OAAN,CAAcC,IANT;AAOhBF,MAAAA,YAAY,EAAED,KAAK,CAACE,OAAN,CAAcC;AAPZ,KAJO;AAazBhB,IAAAA,MAAM,EAAE;AACNuB,MAAAA,SAAS,EAAE,MADL;AAENC,MAAAA,QAAQ,EAAE,OAFJ;AAGNC,MAAAA,MAAM,EAAE,SAHF;AAINC,MAAAA,MAAM,EAAEb,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB;AAJvB;AAbiB,GAAZ;AAAA,CAAf;;eAqBe,wBAAWJ,MAAX,EAAmB9B,WAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport isEmpty from 'lodash/isEmpty';\nimport isUndefined from 'lodash/isUndefined';\nimport find from 'lodash/find';\nimport { DragAnswer } from './answer';\nimport { MatchDroppablePlaceholder } from '@pie-lib/drag';\n\nexport class ChoicesList extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n session: PropTypes.object.isRequired,\n instanceId: PropTypes.string.isRequired,\n model: PropTypes.object.isRequired,\n disabled: PropTypes.bool.isRequired,\n onRemoveAnswer: PropTypes.func,\n };\n\n render() {\n const { model, classes, disabled, session, instanceId, onRemoveAnswer } = this.props;\n const { config } = model;\n const { duplicates } = config;\n\n const filteredAnswers = config.answers\n .filter(\n (answer) =>\n duplicates ||\n isEmpty(session) ||\n !session.value ||\n isUndefined(find(session.value, (val) => val === answer.id)),\n )\n .map((answer) => (\n <DragAnswer\n key={answer.id}\n instanceId={instanceId}\n className={classes.choice}\n draggable={true}\n disabled={disabled}\n session={session}\n type=\"choice\"\n {...answer}\n />\n ));\n\n return (\n <div className={classes.choicesContainer}>\n {MatchDroppablePlaceholder ? (\n <MatchDroppablePlaceholder disabled={disabled} onRemoveAnswer={onRemoveAnswer}>\n {filteredAnswers}\n </MatchDroppablePlaceholder>\n ) : (\n <div className={classes.answersContainer}>{filteredAnswers}</div>\n )}\n </div>\n );\n }\n}\n\nconst styles = (theme) => ({\n choicesContainer: {\n marginBottom: theme.spacing.unit * 2,\n },\n answersContainer: {\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n marginTop: theme.spacing.unit,\n marginBottom: theme.spacing.unit,\n },\n choice: {\n minHeight: '40px',\n minWidth: '200px',\n height: 'initial',\n margin: theme.spacing.unit / 2,\n },\n});\n\nexport default withStyles(styles)(ChoicesList);\n"],"file":"choices-list.js"}
|
package/lib/main.js
CHANGED
package/lib/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Main","props","setState","showCorrectAnswer","state","instanceId","id","session","onSessionChange","value","undefined","place","model","duplicates","config","choiceKey","val","classes","mode","prompt","mainContainer","toggleShowCorrect","onPlaceAnswer","onRemoveAnswer","correctness","feedback","React","Component","PropTypes","object","isRequired","func","string","styles","
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Main","props","setState","showCorrectAnswer","state","instanceId","id","session","onSessionChange","value","undefined","place","model","duplicates","config","choiceKey","val","classes","mode","prompt","mainContainer","toggleShowCorrect","onPlaceAnswer","onRemoveAnswer","correctness","feedback","React","Component","PropTypes","object","isRequired","func","string","styles","display","flexDirection","justifyContent","color","text","backgroundColor","background","promptList","alignItems","styledMain"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,I;;;;;AASX,gBAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,0GAsCC,YAAM;AACxB,YAAKC,QAAL,CAAc;AAAEC,QAAAA,iBAAiB,EAAE,CAAC,MAAKC,KAAL,CAAWD;AAAjC,OAAd;AACD,KAxCkB;AAGjB,UAAKE,UAAL,GAAkB,2BAAlB;AACA,UAAKD,KAAL,GAAa;AACXD,MAAAA,iBAAiB,EAAE;AADR,KAAb;AAJiB;AAOlB;;;;WAED,wBAAeG,EAAf,EAAmB;AACjB,wBAAqC,KAAKL,KAA1C;AAAA,UAAQM,OAAR,eAAQA,OAAR;AAAA,UAAiBC,eAAjB,eAAiBA,eAAjB;AAEAD,MAAAA,OAAO,CAACE,KAAR,CAAcH,EAAd,IAAoBI,SAApB;AAEAF,MAAAA,eAAe,CAACD,OAAD,CAAf;AACD;;;WAED,uBAAcI,KAAd,EAAqBL,EAArB,EAAyB;AACvB,yBAA4C,KAAKL,KAAjD;AAAA,UAAQM,OAAR,gBAAQA,OAAR;AAAA,UAAiBC,eAAjB,gBAAiBA,eAAjB;AAAA,UAAkCI,KAAlC,gBAAkCA,KAAlC;AACA,UACYC,UADZ,GAEID,KAFJ,CACEE,MADF,CACYD,UADZ;;AAIA,UAAI,6BAAYN,OAAO,CAACE,KAApB,CAAJ,EAAgC;AAC9BF,QAAAA,OAAO,CAACE,KAAR,GAAgB,EAAhB;A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,EAAE,QAHH;AAIbC,MAAAA,KAAK,EAAEA,gBAAMC,IAAN,EAJM;AAKbC,MAAAA,eAAe,EAAEF,gBAAMG,UAAN;AALJ,KADK;AAQpBC,IAAAA,UAAU,EAAE;AACVC,MAAAA,UAAU,EAAE;AADF;AARQ,GAAP;AAAA,CAAf;;AAaO,IAAMC,UAAU,GAAG,wBAAWV,MAAX,EAAmBjC,IAAnB,CAAnB;;;eAEQ,2BAAgB2C,UAAhB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withDragContext, swap } from '@pie-lib/drag';\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\nimport { color, Feedback, PreviewPrompt } from '@pie-lib/render-ui';\nimport { withStyles } from '@material-ui/core/styles';\nimport uniqueId from 'lodash/uniqueId';\nimport isUndefined from 'lodash/isUndefined';\nimport findKey from 'lodash/findKey';\nimport AnswerArea from './answer-area';\nimport ChoicesList from './choices-list';\n\nexport class Main extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n session: PropTypes.object.isRequired,\n onSessionChange: PropTypes.func,\n model: PropTypes.object.isRequired,\n prompt: PropTypes.string,\n };\n\n constructor(props) {\n super(props);\n\n this.instanceId = uniqueId();\n this.state = {\n showCorrectAnswer: false,\n };\n }\n\n onRemoveAnswer(id) {\n const { session, onSessionChange } = this.props;\n\n session.value[id] = undefined;\n\n onSessionChange(session);\n }\n\n onPlaceAnswer(place, id) {\n const { session, onSessionChange, model } = this.props;\n const {\n config: { duplicates },\n } = model;\n\n if (isUndefined(session.value)) {\n session.value = {};\n }\n\n const choiceKey = findKey(session.value, (val) => val === id);\n\n if (choiceKey && !duplicates) {\n session.value = swap(session.value, choiceKey, place);\n } else {\n session.value[place] = id;\n }\n\n onSessionChange(session);\n }\n\n toggleShowCorrect = () => {\n this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });\n };\n\n render() {\n const { showCorrectAnswer } = this.state;\n const { classes, model, session } = this.props;\n const { config, mode } = model;\n const { prompt } = config;\n\n return (\n <div className={classes.mainContainer}>\n <PreviewPrompt className=\"prompt\" prompt={prompt} />\n\n <CorrectAnswerToggle show={mode === 'evaluate'} toggled={showCorrectAnswer} onToggle={this.toggleShowCorrect} />\n\n <AnswerArea\n instanceId={this.instanceId}\n model={model}\n session={session}\n onPlaceAnswer={(place, id) => this.onPlaceAnswer(place, id)}\n onRemoveAnswer={(id) => this.onRemoveAnswer(id)}\n disabled={mode !== 'gather'}\n showCorrect={showCorrectAnswer}\n />\n\n <ChoicesList\n instanceId={this.instanceId}\n model={model}\n session={session}\n disabled={mode !== 'gather'}\n onRemoveAnswer={(id) => this.onRemoveAnswer(id)}\n />\n\n {model.correctness && model.feedback && !showCorrectAnswer && (\n <Feedback correctness={model.correctness.correctness} feedback={model.feedback} />\n )}\n </div>\n );\n }\n}\n\nconst styles = () => ({\n mainContainer: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n color: color.text(),\n backgroundColor: color.background(),\n },\n promptList: {\n alignItems: 'flex-start',\n },\n});\n\nexport const styledMain = withStyles(styles)(Main);\n\nexport default withDragContext(styledMain);\n"],"file":"main.js"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "1.17.3-next.
|
|
7
|
+
"version": "1.17.3-next.71+b7d3e7f71",
|
|
8
8
|
"description": "",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"@material-ui/core": "^3.9.2",
|
|
15
15
|
"@material-ui/icons": "^3.0.2",
|
|
16
16
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
17
|
-
"@pie-lib/correct-answer-toggle": "^2.3.
|
|
17
|
+
"@pie-lib/correct-answer-toggle": "^2.3.70",
|
|
18
18
|
"@pie-lib/drag": "^2.1.15",
|
|
19
19
|
"@pie-lib/math-rendering": "^2.5.13",
|
|
20
|
-
"@pie-lib/render-ui": "^4.14.
|
|
20
|
+
"@pie-lib/render-ui": "^4.14.20",
|
|
21
21
|
"classnames": "^2.2.5",
|
|
22
22
|
"debug": "^4.1.1",
|
|
23
23
|
"lodash": "^4.17.10",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"author": "",
|
|
30
30
|
"license": "ISC",
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "b7d3e7f7160aafd5dcfed2960bc6c2f03dba2180",
|
|
32
32
|
"main": "lib/index.js",
|
|
33
33
|
"module": "src/index.js"
|
|
34
34
|
}
|