@pie-element/explicit-constructed-response 10.2.0-next.3 → 10.2.0-next.5
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
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
# [10.2.0-next.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response@10.2.0-next.4...@pie-element/explicit-constructed-response@10.2.0-next.5) (2026-04-03)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- add type check in onDone method to prevent error when deleting resp area from markup ([48d553d](https://github.com/pie-framework/pie-elements/commit/48d553da086dbd229ebbb0d0f72e216bc9d4bcc2))
|
|
11
|
+
|
|
12
|
+
# [10.2.0-next.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response@10.2.0-next.3...@pie-element/explicit-constructed-response@10.2.0-next.4) (2026-04-03)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @pie-element/explicit-constructed-response
|
|
15
|
+
|
|
6
16
|
# [10.2.0-next.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response@10.2.0-next.2...@pie-element/explicit-constructed-response@10.2.0-next.3) (2026-03-25)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @pie-element/explicit-constructed-response
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
# [9.2.0-next.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response-configure@9.2.0-next.3...@pie-element/explicit-constructed-response-configure@9.2.0-next.4) (2026-04-03)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- add type check in onDone method to prevent error when deleting resp area from markup ([48d553d](https://github.com/pie-framework/pie-elements/commit/48d553da086dbd229ebbb0d0f72e216bc9d4bcc2))
|
|
11
|
+
|
|
12
|
+
# [9.2.0-next.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response-configure@9.2.0-next.2...@pie-element/explicit-constructed-response-configure@9.2.0-next.3) (2026-04-03)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @pie-element/explicit-constructed-response-configure
|
|
15
|
+
|
|
6
16
|
# [9.2.0-next.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response-configure@9.2.0-next.1...@pie-element/explicit-constructed-response-configure@9.2.0-next.2) (2026-03-25)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @pie-element/explicit-constructed-response-configure
|
|
@@ -45,6 +45,13 @@ class ECRToolbar extends _react.default.Component {
|
|
|
45
45
|
tr
|
|
46
46
|
} = editor.state;
|
|
47
47
|
|
|
48
|
+
// Type check before calling setNodeMarkup: if the node at the current position is a text node,
|
|
49
|
+
// missing, or not an inline atom, bail out to avoid errors after a delete.
|
|
50
|
+
const nodeAtPos = tr.doc.nodeAt(pos);
|
|
51
|
+
if (!nodeAtPos || nodeAtPos.isText || !nodeAtPos.isAtom || !nodeAtPos.isInline) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
|
|
48
55
|
// Merge old and new attributes
|
|
49
56
|
tr.setNodeMarkup(pos, undefined, {
|
|
50
57
|
...node.attrs,
|
|
@@ -63,6 +70,7 @@ class ECRToolbar extends _react.default.Component {
|
|
|
63
70
|
if (event.key === 'Enter') {
|
|
64
71
|
return true;
|
|
65
72
|
}
|
|
73
|
+
return false;
|
|
66
74
|
});
|
|
67
75
|
(0, _defineProperty2.default)(this, "onBlur", () => {
|
|
68
76
|
if (this.clickedInside) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecr-toolbar.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_editableHtmlTipTap","_markupUtils","findSlateNode","key","window","document","querySelector","StyledEditableHtml","styled","EditableHtml","theme","backgroundColor","palette","common","white","outline","lineHeight","ECRToolbar","React","Component","constructor","args","_defineProperty2","default","markup","toolbarStyle","editor","node","onToolbarDone","onChangeResponse","pos","props","sanitizedMarkup","stripHtmlTags","setState","tr","state","setNodeMarkup","undefined","attrs","value","view","dispatch","respAreaMarkup","event","clickedInside","componentDidMount","correctChoice","choice","domNode","nodeDOM","selection","from","nodeType","domNodeRect","getBoundingClientRect","closest","editorRect","top","left","label","position","width","render","maxLengthPerChoiceEnabled","pluginProps","spellCheck","inputProps","maxLength","createElement","style","_extends2","autoFocus","disableUnderline","onChange","preventDone","onRespAreaChange","onDone","val","onBlur","e","relatedTarget","onKeyDown","activePlugins","languageCharactersProps","language","minHeight","maxHeight","autoWidthToolbar","toolbarOpts","minWidth","isHidden","characters","disabled","exports","PropTypes","object","number","func","isRequired","shape","change","getNextText","bool","_default"],"sources":["../src/ecr-toolbar.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { stripHtmlTags } from './markupUtils';\n\nconst findSlateNode = (key) => {\n return window.document.querySelector('[data-key=\"' + key + '\"]');\n};\n\nconst StyledEditableHtml = styled(EditableHtml)(({ theme }) => ({\n backgroundColor: theme.palette.common.white,\n outline: 'none',\n lineHeight: '15px',\n}));\n\nexport class ECRToolbar extends React.Component {\n static propTypes = {\n correctChoice: PropTypes.object,\n node: PropTypes.object,\n pos: PropTypes.number,\n onDone: PropTypes.func,\n onChangeResponse: PropTypes.func.isRequired,\n onToolbarDone: PropTypes.func.isRequired,\n value: PropTypes.shape({\n change: PropTypes.func.isRequired,\n document: PropTypes.shape({\n getNextText: PropTypes.func.isRequired,\n }),\n }),\n editor: PropTypes.object,\n maxLengthPerChoiceEnabled: PropTypes.bool,\n pluginProps: PropTypes.object,\n spellCheck: PropTypes.bool,\n };\n\n state = {\n markup: '',\n toolbarStyle: {},\n };\n\n componentDidMount() {\n const { correctChoice, node, editor } = this.props;\n const choice = correctChoice || {};\n\n const domNode = editor.view.nodeDOM(editor.state.selection.from);\n\n if (domNode?.nodeType === 1) {\n //eslint-disable-next-line\n const domNodeRect = domNode.getBoundingClientRect();\n const editor = domNode.closest('.tiptap');\n const editorRect = editor.getBoundingClientRect();\n const top = domNodeRect.top - editorRect.top;\n const left = domNodeRect.left - editorRect.left;\n\n this.setState({\n markup: choice.label,\n toolbarStyle: {\n position: 'absolute',\n // top: `${top + domNodeRect.height + 17}px`,\n top: 0,\n // left: `${left + 20}px`,\n left: 0,\n width: `${domNodeRect.width - 4}px`,\n },\n });\n }\n }\n\n onDone = (markup) => {\n const { editor, node, onToolbarDone, onChangeResponse, pos } = this.props;\n const sanitizedMarkup = stripHtmlTags(markup);\n this.setState({ markup: sanitizedMarkup });\n\n const { tr } = editor.state;\n\n // Merge old and new attributes\n tr.setNodeMarkup(pos, undefined, { ...node.attrs, value: sanitizedMarkup });\n editor.view.dispatch(tr);\n\n onToolbarDone(true);\n onChangeResponse(sanitizedMarkup);\n };\n\n onRespAreaChange = (respAreaMarkup) => {\n this.setState({ respAreaMarkup });\n };\n\n onKeyDown = (event) => {\n if (event.key === 'Enter') {\n return true;\n }\n };\n\n onBlur = () => {\n if (this.clickedInside) {\n this.clickedInside = false;\n }\n };\n\n render() {\n const { maxLengthPerChoiceEnabled, pluginProps, spellCheck } = this.props;\n const { markup, toolbarStyle } = this.state;\n const inputProps = maxLengthPerChoiceEnabled ? {} : { maxLength: 25 };\n\n return (\n <div style={toolbarStyle}>\n <StyledEditableHtml\n autoFocus={true}\n disableUnderline\n onChange={(respAreaMarkup) => {\n if (this.preventDone) {\n return;\n }\n this.onRespAreaChange(respAreaMarkup);\n }}\n onDone={(val) => {\n if (this.preventDone) {\n return;\n }\n this.onDone(val);\n }}\n onBlur={(e) => {\n this.preventDone = e.relatedTarget && e.relatedTarget.closest('.insert-character-dialog');\n this.onBlur(e);\n }}\n onKeyDown={this.onKeyDown}\n markup={markup || ''}\n activePlugins={['languageCharacters']}\n pluginProps={pluginProps}\n languageCharactersProps={[{ language: 'spanish' }]}\n minHeight={'15px'}\n maxHeight={'15px'}\n spellCheck={spellCheck}\n autoWidthToolbar\n toolbarOpts={{\n minWidth: 'auto',\n isHidden: !!pluginProps?.characters?.disabled,\n }}\n {...inputProps}\n />\n </div>\n );\n }\n}\n\nexport default ECRToolbar;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,MAAMK,aAAa,GAAIC,GAAG,IAAK;EAC7B,OAAOC,MAAM,CAACC,QAAQ,CAACC,aAAa,CAAC,aAAa,GAAGH,GAAG,GAAG,IAAI,CAAC;AAClE,CAAC;AAED,MAAMI,kBAAkB,GAAG,IAAAC,cAAM,EAACC,2BAAY,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EAC9DC,eAAe,EAAED,KAAK,CAACE,OAAO,CAACC,MAAM,CAACC,KAAK;EAC3CC,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE;AACd,CAAC,CAAC,CAAC;AAEI,MAAMC,UAAU,SAASC,cAAK,CAACC,SAAS,CAAC;EAAAC,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,iBAoBtC;MACNC,MAAM,EAAE,EAAE;MACVC,YAAY,EAAE,CAAC;IACjB,CAAC;IAAA,IAAAH,gBAAA,CAAAC,OAAA,kBA8BSC,MAAM,IAAK;MACnB,MAAM;QAA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,EAAEuD,kBAAS,CAACK,KAAK,CAAC;IACrBC,MAAM,EAAEN,kBAAS,CAACG,IAAI,CAACC,UAAU;IACjC9F,QAAQ,EAAE0F,kBAAS,CAACK,KAAK,CAAC;MACxBE,WAAW,EAAEP,kBAAS,CAACG,IAAI,CAACC;IAC9B,CAAC;EACH,CAAC,CAAC;EACFzE,MAAM,EAAEqE,kBAAS,CAACC,MAAM;EACxBhC,yBAAyB,EAAE+B,kBAAS,CAACQ,IAAI;EACzCtC,WAAW,EAAE8B,kBAAS,CAACC,MAAM;EAC7B9B,UAAU,EAAE6B,kBAAS,CAACQ;AACxB,CAAC;AAAA,IAAAC,QAAA,GAAAV,OAAA,CAAAvE,OAAA,GAgHYN,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ecr-toolbar.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_editableHtmlTipTap","_markupUtils","findSlateNode","key","window","document","querySelector","StyledEditableHtml","styled","EditableHtml","theme","backgroundColor","palette","common","white","outline","lineHeight","ECRToolbar","React","Component","constructor","args","_defineProperty2","default","markup","toolbarStyle","editor","node","onToolbarDone","onChangeResponse","pos","props","sanitizedMarkup","stripHtmlTags","setState","tr","state","nodeAtPos","doc","nodeAt","isText","isAtom","isInline","setNodeMarkup","undefined","attrs","value","view","dispatch","respAreaMarkup","event","clickedInside","componentDidMount","correctChoice","choice","domNode","nodeDOM","selection","from","nodeType","domNodeRect","getBoundingClientRect","closest","editorRect","top","left","label","position","width","render","maxLengthPerChoiceEnabled","pluginProps","spellCheck","inputProps","maxLength","createElement","style","_extends2","autoFocus","disableUnderline","onChange","preventDone","onRespAreaChange","onDone","val","onBlur","e","relatedTarget","onKeyDown","activePlugins","languageCharactersProps","language","minHeight","maxHeight","autoWidthToolbar","toolbarOpts","minWidth","isHidden","characters","disabled","exports","PropTypes","object","number","func","isRequired","shape","change","getNextText","bool","_default"],"sources":["../src/ecr-toolbar.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { stripHtmlTags } from './markupUtils';\n\nconst findSlateNode = (key) => {\n return window.document.querySelector('[data-key=\"' + key + '\"]');\n};\n\nconst StyledEditableHtml = styled(EditableHtml)(({ theme }) => ({\n backgroundColor: theme.palette.common.white,\n outline: 'none',\n lineHeight: '15px',\n}));\n\nexport class ECRToolbar extends React.Component {\n static propTypes = {\n correctChoice: PropTypes.object,\n node: PropTypes.object,\n pos: PropTypes.number,\n onDone: PropTypes.func,\n onChangeResponse: PropTypes.func.isRequired,\n onToolbarDone: PropTypes.func.isRequired,\n value: PropTypes.shape({\n change: PropTypes.func.isRequired,\n document: PropTypes.shape({\n getNextText: PropTypes.func.isRequired,\n }),\n }),\n editor: PropTypes.object,\n maxLengthPerChoiceEnabled: PropTypes.bool,\n pluginProps: PropTypes.object,\n spellCheck: PropTypes.bool,\n };\n\n state = {\n markup: '',\n toolbarStyle: {},\n };\n\n componentDidMount() {\n const { correctChoice, node, editor } = this.props;\n const choice = correctChoice || {};\n\n const domNode = editor.view.nodeDOM(editor.state.selection.from);\n\n if (domNode?.nodeType === 1) {\n //eslint-disable-next-line\n const domNodeRect = domNode.getBoundingClientRect();\n const editor = domNode.closest('.tiptap');\n const editorRect = editor.getBoundingClientRect();\n const top = domNodeRect.top - editorRect.top;\n const left = domNodeRect.left - editorRect.left;\n\n this.setState({\n markup: choice.label,\n toolbarStyle: {\n position: 'absolute',\n // top: `${top + domNodeRect.height + 17}px`,\n top: 0,\n // left: `${left + 20}px`,\n left: 0,\n width: `${domNodeRect.width - 4}px`,\n },\n });\n }\n }\n\n onDone = (markup) => {\n const { editor, node, onToolbarDone, onChangeResponse, pos } = this.props;\n const sanitizedMarkup = stripHtmlTags(markup);\n this.setState({ markup: sanitizedMarkup });\n\n const { tr } = editor.state;\n\n // Type check before calling setNodeMarkup: if the node at the current position is a text node,\n // missing, or not an inline atom, bail out to avoid errors after a delete.\n const nodeAtPos = tr.doc.nodeAt(pos);\n if (!nodeAtPos || nodeAtPos.isText || !nodeAtPos.isAtom || !nodeAtPos.isInline) {\n return false;\n }\n\n // Merge old and new attributes\n tr.setNodeMarkup(pos, undefined, { ...node.attrs, value: sanitizedMarkup });\n editor.view.dispatch(tr);\n\n onToolbarDone(true);\n onChangeResponse(sanitizedMarkup);\n };\n\n onRespAreaChange = (respAreaMarkup) => {\n this.setState({ respAreaMarkup });\n };\n\n onKeyDown = (event) => {\n if (event.key === 'Enter') {\n return true;\n }\n\n return false;\n };\n\n onBlur = () => {\n if (this.clickedInside) {\n this.clickedInside = false;\n }\n };\n\n render() {\n const { maxLengthPerChoiceEnabled, pluginProps, spellCheck } = this.props;\n const { markup, toolbarStyle } = this.state;\n const inputProps = maxLengthPerChoiceEnabled ? {} : { maxLength: 25 };\n\n return (\n <div style={toolbarStyle}>\n <StyledEditableHtml\n autoFocus={true}\n disableUnderline\n onChange={(respAreaMarkup) => {\n if (this.preventDone) {\n return;\n }\n this.onRespAreaChange(respAreaMarkup);\n }}\n onDone={(val) => {\n if (this.preventDone) {\n return;\n }\n this.onDone(val);\n }}\n onBlur={(e) => {\n this.preventDone = e.relatedTarget && e.relatedTarget.closest('.insert-character-dialog');\n this.onBlur(e);\n }}\n onKeyDown={this.onKeyDown}\n markup={markup || ''}\n activePlugins={['languageCharacters']}\n pluginProps={pluginProps}\n languageCharactersProps={[{ language: 'spanish' }]}\n minHeight={'15px'}\n maxHeight={'15px'}\n spellCheck={spellCheck}\n autoWidthToolbar\n toolbarOpts={{\n minWidth: 'auto',\n isHidden: !!pluginProps?.characters?.disabled,\n }}\n {...inputProps}\n />\n </div>\n );\n }\n}\n\nexport default ECRToolbar;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAA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AS,CAACQ,IAAI;EACzCtC,WAAW,EAAE8B,kBAAS,CAACC,MAAM;EAC7B9B,UAAU,EAAE6B,kBAAS,CAACQ;AACxB,CAAC;AAAA,IAAAC,QAAA,GAAAV,OAAA,CAAA7E,OAAA,GAyHYN,UAAU","ignoreList":[]}
|
package/configure/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/explicit-constructed-response-configure",
|
|
3
|
-
"version": "9.2.0-next.
|
|
3
|
+
"version": "9.2.0-next.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"modue": "src/index.js",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"@mui/icons-material": "^7.3.4",
|
|
11
11
|
"@mui/material": "^7.3.4",
|
|
12
12
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
13
|
-
"@pie-lib/config-ui": "12.2.0-next.
|
|
14
|
-
"@pie-lib/editable-html-tip-tap": "1.2.0-next.
|
|
13
|
+
"@pie-lib/config-ui": "12.2.0-next.23",
|
|
14
|
+
"@pie-lib/editable-html-tip-tap": "1.2.0-next.22",
|
|
15
15
|
"classnames": "^2.2.6",
|
|
16
16
|
"debug": "^4.1.1",
|
|
17
17
|
"lodash-es": "^4.17.23",
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
# [7.2.0-next.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response-controller@7.2.0-next.0...@pie-element/explicit-constructed-response-controller@7.2.0-next.1) (2026-04-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/explicit-constructed-response-controller
|
|
9
|
+
|
|
6
10
|
# [7.2.0-next.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response-controller@7.1.1-next.1...@pie-element/explicit-constructed-response-controller@7.2.0-next.0) (2026-03-18)
|
|
7
11
|
|
|
8
12
|
### Features
|
package/controller/package.json
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "10.2.0-next.
|
|
7
|
+
"version": "10.2.0-next.5",
|
|
8
8
|
"description": "",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"postpublish": "../../scripts/postpublish"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@mui/material": "^7.3.4",
|
|
17
17
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
18
18
|
"@pie-lib/correct-answer-toggle": "3.2.0-next.7",
|
|
19
|
-
"@pie-lib/mask-markup": "2.2.0-next.
|
|
19
|
+
"@pie-lib/mask-markup": "2.2.0-next.23",
|
|
20
20
|
"@pie-lib/math-rendering": "4.2.0-next.3",
|
|
21
21
|
"@pie-lib/render-ui": "5.2.0-next.7",
|
|
22
22
|
"@pie-lib/translator": "3.2.0-next.3",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"author": "",
|
|
31
31
|
"license": "ISC",
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "187aac815f5a255602f1c42b05100701fc9b169a",
|
|
33
33
|
"main": "lib/index.js",
|
|
34
34
|
"module": "src/index.js",
|
|
35
35
|
"exports": {
|