@pie-element/extended-text-entry 9.3.1-next.33 → 9.3.1-next.47
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/lib/main.js +11 -1
- package/lib/main.js.map +1 -1
- package/package.json +2 -2
package/lib/main.js
CHANGED
|
@@ -63,6 +63,14 @@ var style = function style(theme) {
|
|
|
63
63
|
editor: {
|
|
64
64
|
marginBottom: theme.spacing.unit * 2,
|
|
65
65
|
borderRadius: '4px'
|
|
66
|
+
},
|
|
67
|
+
srOnly: {
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
left: '-10000px',
|
|
70
|
+
top: 'auto',
|
|
71
|
+
width: '1px',
|
|
72
|
+
height: '1px',
|
|
73
|
+
overflow: 'hidden'
|
|
66
74
|
}
|
|
67
75
|
};
|
|
68
76
|
};
|
|
@@ -141,7 +149,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
141
149
|
ref: function ref(_ref2) {
|
|
142
150
|
_this2.containerRef = _ref2;
|
|
143
151
|
}
|
|
144
|
-
},
|
|
152
|
+
}, /*#__PURE__*/_react["default"].createElement("h2", {
|
|
153
|
+
className: classes.srOnly
|
|
154
|
+
}, "Constructed Response Question"), teacherInstructions && /*#__PURE__*/_react["default"].createElement("div", {
|
|
145
155
|
className: classes.teacherInstructions
|
|
146
156
|
}, !animationsDisabled ? /*#__PURE__*/_react["default"].createElement(_renderUi.Collapsible, {
|
|
147
157
|
labels: {
|
package/lib/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["log","style","theme","main","backgroundColor","color","background","text","prompt","width","marginBottom","spacing","unit","fontSize","teacherInstructions","editor","borderRadius","Main","props","onChange","model","classes","session","dimensions","disabled","feedback","mathInput","spanishInput","specialInput","animationsDisabled","playersToolbarPosition","spellCheckEnabled","value","
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["log","style","theme","main","backgroundColor","color","background","text","prompt","width","marginBottom","spacing","unit","fontSize","teacherInstructions","editor","borderRadius","srOnly","position","left","top","height","overflow","Main","props","onChange","model","classes","session","dimensions","disabled","feedback","mathInput","spanishInput","specialInput","animationsDisabled","playersToolbarPosition","spellCheckEnabled","value","maxHeight","toolbarOpts","teacherInstructionsDiv","languageCharactersProps","push","language","ref","containerRef","hidden","visible","collapsible","changeSession","toString","math","customKeys","keypadMode","equationEditor","controlledKeypadMode","video","audio","React","Component","PropTypes","func","isRequired","object","shape","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,6BAAN,CAAZ;;AAEA,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;AAAA,SAAY;AACxBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,eAAe,EAAEC,gBAAMC,UAAN,EADb;AAEJD,MAAAA,KAAK,EAAEA,gBAAME,IAAN;AAFH,KADkB;AAKxBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,MADD;AAENJ,MAAAA,KAAK,EAAEA,gBAAME,IAAN,EAFD;AAGNG,MAAAA,YAAY,EAAER,KAAK,CAACS,OAAN,CAAcC,IAAd,GAAqB,CAH7B;AAINC,MAAAA,QAAQ,EAAE;AAJJ,KALgB;AAWxBC,IAAAA,mBAAmB,EAAE;AACnBJ,MAAAA,YAAY,EAAER,KAAK,CAACS,OAAN,CAAcC,IAAd,GAAqB;AADhB,KAXG;AAcxBG,IAAAA,MAAM,EAAE;AACNL,MAAAA,YAAY,EAAER,KAAK,CAACS,OAAN,CAAcC,IAAd,GAAqB,CAD7B;AAENI,MAAAA,YAAY,EAAE;AAFR,KAdgB;AAkBxBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,QAAQ,EAAE,UADJ;AAENC,MAAAA,IAAI,EAAE,UAFA;AAGNC,MAAAA,GAAG,EAAE,MAH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,C;;eA+GN,wBAAW9D,KAAX,EAAkBsB,IAAlB,C","sourcesContent":["import React from 'react';\nimport EditableHTML from '@pie-lib/editable-html';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport debug from 'debug';\nimport debounce from 'lodash/debounce';\nimport { color, Feedback, Collapsible, PreviewPrompt } from '@pie-lib/render-ui';\nimport classnames from 'classnames';\n\nconst log = debug('@pie-ui:extended-text-entry');\n\nconst style = (theme) => ({\n main: {\n backgroundColor: color.background(),\n color: color.text(),\n },\n prompt: {\n width: '100%',\n color: color.text(),\n marginBottom: theme.spacing.unit * 2,\n fontSize: 'inherit',\n },\n teacherInstructions: {\n marginBottom: theme.spacing.unit * 2,\n },\n editor: {\n marginBottom: theme.spacing.unit * 2,\n borderRadius: '4px',\n },\n srOnly: {\n position: 'absolute',\n left: '-10000px',\n top: 'auto',\n width: '1px',\n height: '1px',\n overflow: 'hidden',\n },\n});\n\nexport class Main extends React.Component {\n static propTypes = {\n onChange: PropTypes.func.isRequired,\n model: PropTypes.object,\n classes: PropTypes.object.isRequired,\n session: PropTypes.shape({\n value: PropTypes.string,\n }).isRequired,\n };\n\n changeSession = debounce(this.props.onChange, 1500);\n\n render() {\n const { model, classes, session } = this.props;\n\n const {\n dimensions,\n disabled,\n feedback,\n teacherInstructions,\n mathInput,\n spanishInput,\n specialInput,\n animationsDisabled,\n playersToolbarPosition,\n spellCheckEnabled,\n } = model;\n const { value } = session;\n const { width, height } = dimensions || {};\n const maxHeight = '40vh';\n const toolbarOpts = { position: playersToolbarPosition === 'top' ? 'top' : 'bottom' };\n\n log('[render] disabled? ', disabled);\n\n const teacherInstructionsDiv = (\n <PreviewPrompt defaultClassName=\"teacher-instructions\" prompt={teacherInstructions} />\n );\n\n const languageCharactersProps = [];\n\n if (spanishInput) {\n languageCharactersProps.push({ language: 'spanish' });\n }\n\n if (specialInput) {\n languageCharactersProps.push({ language: 'special' });\n }\n\n return (\n <div\n className={classes.main}\n ref={(ref) => {\n this.containerRef = ref;\n }}\n >\n <h2 className={classes.srOnly}>Constructed Response Question</h2>\n\n {teacherInstructions && (\n <div className={classes.teacherInstructions}>\n {!animationsDisabled ? (\n <Collapsible\n labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}\n className={classes.collapsible}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n ) : (\n teacherInstructionsDiv\n )}\n </div>\n )}\n\n {model.prompt && (\n <Typography component={'span'} className={classes.prompt}>\n <PreviewPrompt defaultClassName=\"prompt\" prompt={model.prompt} />\n </Typography>\n )}\n\n <EditableHTML\n className={classnames(classes.editor, 'response-area-editor')}\n onChange={this.changeSession}\n markup={value || ''}\n width={width && width.toString()}\n minHeight={height && height.toString()}\n maxHeight={maxHeight}\n disabled={disabled}\n highlightShape={true}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n pluginProps={{\n math: {\n disabled: !mathInput,\n customKeys: this.props.model.customKeys,\n keypadMode: this.props.model.equationEditor,\n controlledKeypadMode: false,\n },\n video: {\n disabled: true,\n },\n audio: {\n disabled: true,\n },\n }}\n languageCharactersProps={languageCharactersProps}\n />\n\n {feedback && <Feedback correctness=\"correct\" feedback={feedback} />}\n </div>\n );\n }\n}\n\nexport default withStyles(style)(Main);\n"],"file":"main.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry",
|
|
3
|
-
"version": "9.3.1-next.
|
|
3
|
+
"version": "9.3.1-next.47+de41d6516",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react": "^16.8.1",
|
|
23
23
|
"react-dom": "^16.8.1"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "de41d651639fba66ed94d99a6b74579295800365",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"postpublish": "../../scripts/postpublish"
|
|
28
28
|
},
|